]> code.ossystems Code Review - openembedded-core.git/commitdiff
oe-selftest: add test_image_bootpart_globbed test for wic
authorEd Bartosh <ed.bartosh@linux.intel.com>
Sun, 26 Mar 2017 17:42:30 +0000 (20:42 +0300)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Fri, 31 Mar 2017 11:12:16 +0000 (12:12 +0100)
Test image-bootpart wic plugin with globbed value of
IMAGE_BOOT_FILES variable to increase test coverage.

[YOCTO #10618]

Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
meta/lib/oeqa/selftest/wic.py

index f0d9dd90e5df09f27bcaaf9cb59e7621b1b969b7..2401aaa156d10ef61652a51c054d80ec89b6c477 100644 (file)
@@ -748,3 +748,13 @@ part /etc --source rootfs --ondisk mmcblk0 --fstype=ext4 --exclude-path bin/ --r
             wksname = os.path.splitext(os.path.basename(wks.name))[0]
             out = glob(self.resultdir + "%s-*direct" % wksname)
             self.assertEqual(1, len(out))
+
+    def test_image_bootpart_globbed(self):
+        """Test globbed sources with image-bootpart plugin"""
+        img = "core-image-minimal"
+        cmd = "wic create sdimage-bootpart -e %s -o %s" % (img, self.resultdir)
+        config = 'IMAGE_BOOT_FILES = "%s*"' % get_bb_var('KERNEL_IMAGETYPE', img)
+        self.append_config(config)
+        self.assertEqual(0, runCmd(cmd).status)
+        self.remove_config(config)
+        self.assertEqual(1, len(glob(self.resultdir + "sdimage-bootpart-*direct")))