Openembedded Core Discussions
 help / color / mirror / Atom feed
From: Ed Bartosh <ed.bartosh@linux.intel.com>
To: openembedded-core@lists.openembedded.org
Subject: [wic][PATCH] oe-selftest: wic: Fix testcase
Date: Tue, 16 Jun 2015 09:53:57 +0300	[thread overview]
Message-ID: <1434437637-21465-1-git-send-email-ed.bartosh@linux.intel.com> (raw)

Fixed test05_build_artifacts testcase by using values of MACHINE
and BUILD_SYS bitbake variables in paths to artifacts.

Test was failing because of hardcoded machine(qemux86) and
build_sys(qemux86-poky-linux) in artifact paths.

[YOCTO #7730]

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

diff --git a/meta/lib/oeqa/selftest/wic.py b/meta/lib/oeqa/selftest/wic.py
index 358f09e..0e3f1f6 100644
--- a/meta/lib/oeqa/selftest/wic.py
+++ b/meta/lib/oeqa/selftest/wic.py
@@ -29,7 +29,7 @@ from glob import glob
 from shutil import rmtree
 
 from oeqa.selftest.base import oeSelfTest
-from oeqa.utils.commands import runCmd, bitbake
+from oeqa.utils.commands import runCmd, bitbake, get_bb_var
 
 class Wic(oeSelfTest):
     """Wic test class."""
@@ -66,12 +66,15 @@ class Wic(oeSelfTest):
 
     def test05_build_artifacts(self):
         """Test wic create directdisk providing all artifacts."""
-        self.assertEqual(0, runCmd("wic create directdisk "
-                                   "-b tmp/sysroots/qemux86/usr/share "
-                                   "-k tmp/deploy/images/qemux86 "
-                                   "-n tmp/sysroots/x86_64-linux "
-                                   "-r tmp/work/qemux86-poky-linux/"
-                                   "core-image-minimal/1.0-r0/rootfs").status)
+        vars = {'machine': get_bb_var('MACHINE'),
+                'buildsys': get_bb_var('BUILD_SYS')}
+        status = runCmd("wic create directdisk "
+                        "-b tmp/sysroots/%(machine)s/usr/share "
+                        "-k tmp/deploy/images/%(machine)s "
+                        "-n tmp/sysroots/%(buildsys)s "
+                        "-r tmp/work/%(machine)s-poky-linux/"
+                        "core-image-minimal/1.0-r0/rootfs" % vars).status
+        self.assertEqual(0, status)
         self.assertEqual(1, len(glob(self.resultdir + "directdisk-*.direct")))
 
     def test06_gpt_image(self):
-- 
2.1.4



                 reply	other threads:[~2015-06-16  8:47 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1434437637-21465-1-git-send-email-ed.bartosh@linux.intel.com \
    --to=ed.bartosh@linux.intel.com \
    --cc=openembedded-core@lists.openembedded.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox