summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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)