summaryrefslogtreecommitdiffstats
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:38:15 +0100
commitdda85cd420d47d97b0d0b0f294b37cd6066c541c (patch)
treeda9a087cee6bfb2298402c25b885e83ed84be777
parent9be59c02901a6c9ecaaa293aea2e938edf9b122c (diff)
downloadopenembedded-core-dda85cd420d47d97b0d0b0f294b37cd6066c541c.tar.gz
openembedded-core-dda85cd420d47d97b0d0b0f294b37cd6066c541c.tar.bz2
openembedded-core-dda85cd420d47d97b0d0b0f294b37cd6066c541c.zip
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] Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
-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
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 = dict((var.lower(), get_bb_var(var, 'core-image-minimal')) \
+ for var in ('STAGING_DATADIR', 'DEPLOY_DIR_IMAGE',
+ 'STAGING_DIR_NATIVE', 'IMAGE_ROOTFS'))
+ status = runCmd("wic create directdisk "
+ "-b %(staging_datadir)s "
+ "-k %(deploy_dir_image)s "
+ "-n %(staging_dir_native)s "
+ "-r %(image_rootfs)s" % vars).status
+ self.assertEqual(0, status)
self.assertEqual(1, len(glob(self.resultdir + "directdisk-*.direct")))
def test06_gpt_image(self):