]> code.ossystems Code Review - openembedded-core.git/commitdiff
wic: fixed test_iso_image test case
authorEd Bartosh <ed.bartosh@linux.intel.com>
Wed, 18 Jan 2017 17:21:17 +0000 (19:21 +0200)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Mon, 23 Jan 2017 12:03:51 +0000 (12:03 +0000)
Fixed isoimage-isohybrid plulgin and correspondent wic tet case:
- used wic-tools target when getting varlue of STAGING_LIBDIR variable
- ensured that image is built with efi and hddimg enabled

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

index 6a61ba6868107c741009deef1572bc652f028901..14109c4b5a988f3ec82950aec22df7ae40616a9c 100644 (file)
@@ -149,6 +149,10 @@ class Wic(oeSelfTest):
     @testcase(1346)
     def test_iso_image(self):
         """Test creation of hybrid iso image with legacy and EFI boot"""
+        config = 'IMAGE_FSTYPES += " hddimg "\nMACHINE_FEATURES_append = " efi"\n'
+        self.append_config(config)
+        bitbake('core-image-minimal')
+        self.remove_config(config)
         cmd = "wic create mkhybridiso --image-name core-image-minimal"
         self.assertEqual(0, runCmd(cmd).status)
         self.assertEqual(1, len(glob(self.resultdir + "HYBRID_ISO_IMG-*.direct")))
index 15fd858d22ba268702b0afb1cd564721fea21f48..a8a5dc0a59cff3f5f799a0b2b998636adc897954 100644 (file)
@@ -336,14 +336,11 @@ class IsoImagePlugin(SourcePlugin):
 
                 if not os.path.isfile("%s/EFI/BOOT/%s" \
                                 % (bootimg_dir, grub_image)):
-                    grub_path = get_bitbake_var("STAGING_LIBDIR")
+                    grub_path = get_bitbake_var("STAGING_LIBDIR", "wic-tools")
                     if not grub_path:
                         msger.error("Couldn't find STAGING_LIBDIR, exiting.\n")
 
                     grub_core = "%s/grub/%s" % (grub_path, grub_target)
-                    if not os.path.exists(grub_core):
-                        msger.info("Building grub-efi...\n")
-                        exec_cmd("bitbake grub-efi")
                     if not os.path.exists(grub_core):
                         msger.error("Please build grub-efi first\n")