summaryrefslogtreecommitdiffstats
path: root/meta
diff options
context:
space:
mode:
authorEd Bartosh <ed.bartosh@linux.intel.com>2017-07-14 15:33:07 +0300
committerRichard Purdie <richard.purdie@linuxfoundation.org>2017-07-17 14:01:37 +0100
commit5a514183e1df22ca0f9e3a73a54049de4bec840e (patch)
tree70978983fde0264866741a894988b23ab0729c37 /meta
parentc23be1034bbdeb0b481ae23b85e4bb4501222d28 (diff)
downloadpoky-5a514183e1df22ca0f9e3a73a54049de4bec840e.tar.gz
selftest: fixed 5 wic test cases
Added core-image-minimal -> syslinux dependency to ensure syslinux artifacts are available from core-image-minimal build. This should fix test_iso_image, test_bootloader_config and test_default_output_dir test cases. Used --native-sysroot in test_image_vars_dir_long and test_image_vars_dir_short test cases to point out to wic-tools native sysrtoot. (From OE-Core rev: b7bcc4ba756aa3941c89999e9d6761738ea5bb05) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta')
-rw-r--r--meta/lib/oeqa/selftest/cases/wic.py23
1 files changed, 19 insertions, 4 deletions
diff --git a/meta/lib/oeqa/selftest/cases/wic.py b/meta/lib/oeqa/selftest/cases/wic.py
index 02c7d0f66e..737fbc6002 100644
--- a/meta/lib/oeqa/selftest/cases/wic.py
+++ b/meta/lib/oeqa/selftest/cases/wic.py
@@ -188,7 +188,8 @@ class Wic(OESelftestTestCase):
188 def test_iso_image(self): 188 def test_iso_image(self):
189 """Test creation of hybrid iso image with legacy and EFI boot""" 189 """Test creation of hybrid iso image with legacy and EFI boot"""
190 config = 'INITRAMFS_IMAGE = "core-image-minimal-initramfs"\n'\ 190 config = 'INITRAMFS_IMAGE = "core-image-minimal-initramfs"\n'\
191 'MACHINE_FEATURES_append = " efi"\n' 191 'MACHINE_FEATURES_append = " efi"\n'\
192 'DEPENDS_pn-core-image-minimal += "syslinux"\n'
192 self.append_config(config) 193 self.append_config(config)
193 bitbake('core-image-minimal') 194 bitbake('core-image-minimal')
194 self.remove_config(config) 195 self.remove_config(config)
@@ -217,6 +218,10 @@ class Wic(OESelftestTestCase):
217 @only_for_arch(['i586', 'i686', 'x86_64']) 218 @only_for_arch(['i586', 'i686', 'x86_64'])
218 def test_bootloader_config(self): 219 def test_bootloader_config(self):
219 """Test creation of directdisk-bootloader-config image""" 220 """Test creation of directdisk-bootloader-config image"""
221 config = 'DEPENDS_pn-core-image-minimal += "syslinux"\n'
222 self.append_config(config)
223 bitbake('core-image-minimal')
224 self.remove_config(config)
220 cmd = "wic create directdisk-bootloader-config -e core-image-minimal -o %s" % self.resultdir 225 cmd = "wic create directdisk-bootloader-config -e core-image-minimal -o %s" % self.resultdir
221 self.assertEqual(0, runCmd(cmd).status) 226 self.assertEqual(0, runCmd(cmd).status)
222 self.assertEqual(1, len(glob(self.resultdir + "directdisk-bootloader-config-*direct"))) 227 self.assertEqual(1, len(glob(self.resultdir + "directdisk-bootloader-config-*direct")))
@@ -248,6 +253,10 @@ class Wic(OESelftestTestCase):
248 """Test default output location""" 253 """Test default output location"""
249 for fname in glob("directdisk-*.direct"): 254 for fname in glob("directdisk-*.direct"):
250 os.remove(fname) 255 os.remove(fname)
256 config = 'DEPENDS_pn-core-image-minimal += "syslinux"\n'
257 self.append_config(config)
258 bitbake('core-image-minimal')
259 self.remove_config(config)
251 cmd = "wic create directdisk -e core-image-minimal" 260 cmd = "wic create directdisk -e core-image-minimal"
252 self.assertEqual(0, runCmd(cmd).status) 261 self.assertEqual(0, runCmd(cmd).status)
253 self.assertEqual(1, len(glob("directdisk-*.direct"))) 262 self.assertEqual(1, len(glob("directdisk-*.direct")))
@@ -569,10 +578,12 @@ part /etc --source rootfs --ondisk mmcblk0 --fstype=ext4 --exclude-path bin/ --r
569 """Test image vars directory selection -v option""" 578 """Test image vars directory selection -v option"""
570 image = 'core-image-minimal' 579 image = 'core-image-minimal'
571 imgenvdir = self._get_image_env_path(image) 580 imgenvdir = self._get_image_env_path(image)
581 native_sysroot = get_bb_var("RECIPE_SYSROOT_NATIVE", "wic-tools")
572 582
573 self.assertEqual(0, runCmd("wic create wictestdisk " 583 self.assertEqual(0, runCmd("wic create wictestdisk "
574 "--image-name=%s -v %s -o %s" 584 "--image-name=%s -v %s -n %s -o %s"
575 % (image, imgenvdir, self.resultdir)).status) 585 % (image, imgenvdir, native_sysroot,
586 self.resultdir)).status)
576 self.assertEqual(1, len(glob(self.resultdir + "wictestdisk-*direct"))) 587 self.assertEqual(1, len(glob(self.resultdir + "wictestdisk-*direct")))
577 588
578 @OETestID(1665) 589 @OETestID(1665)
@@ -580,11 +591,15 @@ part /etc --source rootfs --ondisk mmcblk0 --fstype=ext4 --exclude-path bin/ --r
580 """Test image vars directory selection --vars option""" 591 """Test image vars directory selection --vars option"""
581 image = 'core-image-minimal' 592 image = 'core-image-minimal'
582 imgenvdir = self._get_image_env_path(image) 593 imgenvdir = self._get_image_env_path(image)
594 native_sysroot = get_bb_var("RECIPE_SYSROOT_NATIVE", "wic-tools")
595
583 self.assertEqual(0, runCmd("wic create wictestdisk " 596 self.assertEqual(0, runCmd("wic create wictestdisk "
584 "--image-name=%s " 597 "--image-name=%s "
585 "--vars %s " 598 "--vars %s "
599 "--native-sysroot %s "
586 "--outdir %s" 600 "--outdir %s"
587 % (image, imgenvdir, self.resultdir)).status) 601 % (image, imgenvdir, native_sysroot,
602 self.resultdir)).status)
588 self.assertEqual(1, len(glob(self.resultdir + "wictestdisk-*direct"))) 603 self.assertEqual(1, len(glob(self.resultdir + "wictestdisk-*direct")))
589 604
590 @OETestID(1351) 605 @OETestID(1351)