diff options
Diffstat (limited to 'meta-yocto-bsp/lib/oeqa/selftest/cases/systemd_boot.py')
-rw-r--r-- | meta-yocto-bsp/lib/oeqa/selftest/cases/systemd_boot.py | 24 |
1 files changed, 13 insertions, 11 deletions
diff --git a/meta-yocto-bsp/lib/oeqa/selftest/cases/systemd_boot.py b/meta-yocto-bsp/lib/oeqa/selftest/cases/systemd_boot.py index 0a3a2cdc4b..6ce9a3b3f8 100644 --- a/meta-yocto-bsp/lib/oeqa/selftest/cases/systemd_boot.py +++ b/meta-yocto-bsp/lib/oeqa/selftest/cases/systemd_boot.py @@ -2,7 +2,7 @@ import os from oeqa.selftest.case import OESelftestTestCase from oeqa.core.decorator.depends import OETestDepends -from oeqa.utils.commands import runCmd, bitbake, get_bb_var, runqemu +from oeqa.utils.commands import runCmd, bitbake, get_bb_var, get_bb_vars, runqemu class Systemdboot(OESelftestTestCase): @@ -21,8 +21,9 @@ class Systemdboot(OESelftestTestCase): features += 'MACHINE = "genericx86-64"' self.append_config(features) - deploydir = get_bb_var('DEPLOY_DIR_IMAGE', "core-image-minimal") - systemdbootfile = os.path.join(deploydir, 'systemd-bootx64.efi') + image = 'core-image-minimal' + bb_vars = get_bb_vars(['DEPLOY_DIR_IMAGE', 'IMAGE_LINK_NAME'], image) + systemdbootfile = os.path.join(bb_vars['DEPLOY_DIR_IMAGE'], 'systemd-bootx64.efi') # Ensure we're actually testing that this gets built and not that # it was around from an earlier build @@ -30,7 +31,7 @@ class Systemdboot(OESelftestTestCase): runCmd('rm -f %s' % systemdbootfile) # Build a genericx86-64/efi systemdboot image - bitbake('mtools-native core-image-minimal') + bitbake('mtools-native core-image-minimal wic-tools') found = os.path.isfile(systemdbootfile) self.assertTrue(found, 'Systemd-Boot file %s not found' % systemdbootfile) @@ -38,9 +39,9 @@ class Systemdboot(OESelftestTestCase): """ Summary: Check if EFI bootloader for systemd is correctly build Dependencies: Image was built correctly on testcase 1445 - Steps: 1. Copy bootx64.efi file form the hddimg created + Steps: 1. Copy bootx64.efi file from the wic created under build/tmp/deploy/images/genericx86-64 - 2. Check bootx64.efi was copied form hddimg + 2. Check bootx64.efi was copied from wic 3. Verify the checksums from the copied and previously created file are equal. Expected : Systemd-bootx64.efi and bootx64.efi should be the same @@ -50,16 +51,17 @@ class Systemdboot(OESelftestTestCase): AutomatedBy: Jose Perez Carranza <jose.perez.carranza at linux-intel.com> """ - systemdbootimage = os.path.join(deploydir, 'core-image-minimal-genericx86-64.hddimg') - imagebootfile = os.path.join(deploydir, 'bootx64.efi') - mcopynative = os.path.join(get_bb_var('STAGING_BINDIR_NATIVE', "core-image-minimal"), 'mcopy') + systemdbootimage = os.path.join(bb_vars['DEPLOY_DIR_IMAGE'], '%s.wic' % bb_vars['IMAGE_LINK_NAME']) + imagebootfile = os.path.join(bb_vars['DEPLOY_DIR_IMAGE'], 'bootx64.efi') # Clean environment before start the test if os.path.isfile(imagebootfile): runCmd('rm -f %s' % imagebootfile) - runCmd('%s -i %s ::EFI/BOOT/bootx64.efi %s' % (mcopynative ,systemdbootimage, - imagebootfile)) + sysroot = get_bb_var('RECIPE_SYSROOT_NATIVE', 'wic-tools') + + runCmd('wic cp %s:1/EFI/BOOT/bootx64.efi %s -n %s' % (systemdbootimage, + imagebootfile, sysroot)) found = os.path.isfile(imagebootfile) self.assertTrue(found, 'bootx64.efi file %s was not copied from image' |