summaryrefslogtreecommitdiffstats
path: root/meta/lib
diff options
context:
space:
mode:
authorEd Bartosh <ed.bartosh@linux.intel.com>2015-06-16 09:43:17 +0300
committerRichard Purdie <richard.purdie@linuxfoundation.org>2015-06-23 11:47:30 +0100
commit410e272591cfc5ef97b82bc2fa3895aab09578cf (patch)
tree16ed176be868078820e259e926938d73382dc9e1 /meta/lib
parent2173a0ec28929e3a62df62195b8c83fb61811713 (diff)
downloadpoky-410e272591cfc5ef97b82bc2fa3895aab09578cf.tar.gz
oe-selftest: wic: Fix testcase
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] (From OE-Core rev: dda85cd420d47d97b0d0b0f294b37cd6066c541c) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/lib')
-rw-r--r--meta/lib/oeqa/selftest/wic.py17
1 files changed, 10 insertions, 7 deletions
diff --git a/meta/lib/oeqa/selftest/wic.py b/meta/lib/oeqa/selftest/wic.py
index 358f09e72f..60c8cb3deb 100644
--- a/meta/lib/oeqa/selftest/wic.py
+++ b/meta/lib/oeqa/selftest/wic.py
@@ -29,7 +29,7 @@ from glob import glob
29from shutil import rmtree 29from shutil import rmtree
30 30
31from oeqa.selftest.base import oeSelfTest 31from oeqa.selftest.base import oeSelfTest
32from oeqa.utils.commands import runCmd, bitbake 32from oeqa.utils.commands import runCmd, bitbake, get_bb_var
33 33
34class Wic(oeSelfTest): 34class Wic(oeSelfTest):
35 """Wic test class.""" 35 """Wic test class."""
@@ -66,12 +66,15 @@ class Wic(oeSelfTest):
66 66
67 def test05_build_artifacts(self): 67 def test05_build_artifacts(self):
68 """Test wic create directdisk providing all artifacts.""" 68 """Test wic create directdisk providing all artifacts."""
69 self.assertEqual(0, runCmd("wic create directdisk " 69 vars = dict((var.lower(), get_bb_var(var, 'core-image-minimal')) \
70 "-b tmp/sysroots/qemux86/usr/share " 70 for var in ('STAGING_DATADIR', 'DEPLOY_DIR_IMAGE',
71 "-k tmp/deploy/images/qemux86 " 71 'STAGING_DIR_NATIVE', 'IMAGE_ROOTFS'))
72 "-n tmp/sysroots/x86_64-linux " 72 status = runCmd("wic create directdisk "
73 "-r tmp/work/qemux86-poky-linux/" 73 "-b %(staging_datadir)s "
74 "core-image-minimal/1.0-r0/rootfs").status) 74 "-k %(deploy_dir_image)s "
75 "-n %(staging_dir_native)s "
76 "-r %(image_rootfs)s" % vars).status
77 self.assertEqual(0, status)
75 self.assertEqual(1, len(glob(self.resultdir + "directdisk-*.direct"))) 78 self.assertEqual(1, len(glob(self.resultdir + "directdisk-*.direct")))
76 79
77 def test06_gpt_image(self): 80 def test06_gpt_image(self):