All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] oe-selftest: Build wic runtime requirements and images before testing
@ 2015-05-21  8:07 Ed Bartosh
  2015-05-21 11:05 ` Paul Eggleton
  0 siblings, 1 reply; 3+ messages in thread
From: Ed Bartosh @ 2015-05-21  8:07 UTC (permalink / raw)
  To: openembedded-core

Some native tools (syslinux, parted, mtools, etc) are required
by wic to produce images. Unit tests fail if the tools are
not available.

Baked tools and image-core-minimal used by wic before running tests.

[YOCTO #7730]

Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
---
 meta/lib/oeqa/selftest/wic.py | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/meta/lib/oeqa/selftest/wic.py b/meta/lib/oeqa/selftest/wic.py
index c628b59..817685d 100644
--- a/meta/lib/oeqa/selftest/wic.py
+++ b/meta/lib/oeqa/selftest/wic.py
@@ -36,6 +36,12 @@ class Wic(oeSelfTest):
 
     resultdir = "/var/tmp/wic/build/"
 
+    @classmethod
+    def setUpClass(cls):
+        """Build wic runtime dependencies and images used in the tests."""
+        runCmd('bitbake syslinux syslinux-native parted-native '
+               'dosfstools-native mtools-native core-image-minimal')
+
     def setUp(self):
         """This code is executed before each test method."""
         rmtree(self.resultdir, ignore_errors=True)
-- 
2.1.4



^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [PATCH v2] oe-selftest: Build wic runtime requirements and images before testing
  2015-05-21 11:05 ` Paul Eggleton
@ 2015-05-21 10:23   ` Ed Bartosh
  0 siblings, 0 replies; 3+ messages in thread
From: Ed Bartosh @ 2015-05-21 10:23 UTC (permalink / raw)
  To: openembedded-core

Some native tools (syslinux, parted, mtools, etc) are required
by wic to produce images. Unit tests fail if the tools are
not available.

Baked tools and image-core-minimal used by wic before running tests.

[YOCTO #7730]

Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
---
 meta/lib/oeqa/selftest/wic.py | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/meta/lib/oeqa/selftest/wic.py b/meta/lib/oeqa/selftest/wic.py
index c628b59..a2ce2cb 100644
--- a/meta/lib/oeqa/selftest/wic.py
+++ b/meta/lib/oeqa/selftest/wic.py
@@ -29,13 +29,19 @@ from glob import glob
 from shutil import rmtree
 
 from oeqa.selftest.base import oeSelfTest
-from oeqa.utils.commands import runCmd
+from oeqa.utils.commands import runCmd, bitbake
 
 class Wic(oeSelfTest):
     """Wic test class."""
 
     resultdir = "/var/tmp/wic/build/"
 
+    @classmethod
+    def setUpClass(cls):
+        """Build wic runtime dependencies and images used in the tests."""
+        bitbake('syslinux syslinux-native parted-native '
+                'dosfstools-native mtools-native core-image-minimal')
+
     def setUp(self):
         """This code is executed before each test method."""
         rmtree(self.resultdir, ignore_errors=True)
-- 
2.1.4



^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] oe-selftest: Build wic runtime requirements and images before testing
  2015-05-21  8:07 [PATCH] oe-selftest: Build wic runtime requirements and images before testing Ed Bartosh
@ 2015-05-21 11:05 ` Paul Eggleton
  2015-05-21 10:23   ` [PATCH v2] " Ed Bartosh
  0 siblings, 1 reply; 3+ messages in thread
From: Paul Eggleton @ 2015-05-21 11:05 UTC (permalink / raw)
  To: Ed Bartosh; +Cc: openembedded-core

Hi Ed,

On Thursday 21 May 2015 11:07:58 Ed Bartosh wrote:
> Some native tools (syslinux, parted, mtools, etc) are required
> by wic to produce images. Unit tests fail if the tools are
> not available.
> 
> Baked tools and image-core-minimal used by wic before running tests.
> 
> [YOCTO #7730]
> 
> Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
> ---
>  meta/lib/oeqa/selftest/wic.py | 6 ++++++
>  1 file changed, 6 insertions(+)
> 
> diff --git a/meta/lib/oeqa/selftest/wic.py b/meta/lib/oeqa/selftest/wic.py
> index c628b59..817685d 100644
> --- a/meta/lib/oeqa/selftest/wic.py
> +++ b/meta/lib/oeqa/selftest/wic.py
> @@ -36,6 +36,12 @@ class Wic(oeSelfTest):
> 
>      resultdir = "/var/tmp/wic/build/"
> 
> +    @classmethod
> +    def setUpClass(cls):
> +        """Build wic runtime dependencies and images used in the tests."""
> +        runCmd('bitbake syslinux syslinux-native parted-native '
> +               'dosfstools-native mtools-native core-image-minimal')
> +
>      def setUp(self):
>          """This code is executed before each test method."""
>          rmtree(self.resultdir, ignore_errors=True)

FYI there is a bitbake() function in meta/lib/oeqa/utils/commands.py that I'd 
recomment using rather than runCmd() directly. Ultimately it ends up doing the 
same thing, but at least it keeps the details of how bitbake is invoked 
isolated from what your test needs to build.

Cheers,
Paul

-- 

Paul Eggleton
Intel Open Source Technology Centre


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2015-05-21 12:17 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-05-21  8:07 [PATCH] oe-selftest: Build wic runtime requirements and images before testing Ed Bartosh
2015-05-21 11:05 ` Paul Eggleton
2015-05-21 10:23   ` [PATCH v2] " Ed Bartosh

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.