* use IMAGE_LINK_NAME instead of hardcoding
  core-image-minimal-${MACHINE} assumption

[YOCTO #12937]

Signed-off-by: Martin Jansa <[email protected]>
---
 meta/lib/oeqa/selftest/cases/wic.py | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/meta/lib/oeqa/selftest/cases/wic.py 
b/meta/lib/oeqa/selftest/cases/wic.py
index 0b0ca90c1e..d479343773 100644
--- a/meta/lib/oeqa/selftest/cases/wic.py
+++ b/meta/lib/oeqa/selftest/cases/wic.py
@@ -1352,14 +1352,15 @@ class Wic2(WicTestCase):
         """Test --part-name argument to set partition name in GPT table"""
         config = 'IMAGE_FSTYPES += "wic"\nWKS_FILE = 
"test_gpt_partition_name.wks"\n'
         self.append_config(config)
-        bitbake('core-image-minimal')
+        image = 'core-image-minimal'
+        bitbake(image)
         self.remove_config(config)
         deploy_dir = get_bb_var('DEPLOY_DIR_IMAGE')
-        machine = self.td['MACHINE']
+        bb_vars = get_bb_vars(['DEPLOY_DIR_IMAGE', 'IMAGE_LINK_NAME'], image)
+        image_path = os.path.join(bb_vars['DEPLOY_DIR_IMAGE'], '%s.wic' % 
bb_vars['IMAGE_LINK_NAME'])
 
-        image_path = os.path.join(deploy_dir, 'core-image-minimal-%s.wic' % 
machine)
         # Image is created
-        self.assertTrue(os.path.exists(image_path))
+        self.assertTrue(os.path.exists(image_path), "image file %s doesn't 
exist" % image_path)
 
         # Check the names of the three partitions
         # as listed in test_gpt_partition_name.wks
-- 
2.40.1

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#181790): 
https://lists.openembedded.org/g/openembedded-core/message/181790
Mute This Topic: https://lists.openembedded.org/mt/99163621/21656
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to