From df3ce81ed3e5491b084041c5bcbd16dada129cf9 Mon Sep 17 00:00:00 2001 From: Martin Jansa Date: Sat, 18 Mar 2023 10:42:26 +0100 Subject: selftest: systemd_boot.py: respect IMAGE_LINK_NAME * use IMAGE_LINK_NAME instead of hardcoding core-image-minimal-genericx86-64.wic assumption [YOCTO #12937] (From meta-yocto rev: d0557c03c5fdeb294f8461ca90f875f0387bff8a) Signed-off-by: Martin Jansa Signed-off-by: Richard Purdie --- meta-yocto-bsp/lib/oeqa/selftest/cases/systemd_boot.py | 11 ++++++----- 1 file changed, 6 insertions(+), 5 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 57599e19aa..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 @@ -50,8 +51,8 @@ class Systemdboot(OESelftestTestCase): AutomatedBy: Jose Perez Carranza """ - systemdbootimage = os.path.join(deploydir, 'core-image-minimal-genericx86-64.wic') - imagebootfile = os.path.join(deploydir, 'bootx64.efi') + 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): -- cgit v1.2.3-54-g00ecf