Skip to contentSkip to conversation

testexport: fallback for empty IMAGE_LINK_NAME

PATCH New Konrad Weihmann 1 participant 2 messages Sep 21, 2024 1 message not in the archive

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

#1 lore raw

PATCH 2/3 testimage: fallback for empty IMAGE_LINK_NAME

if IMAGE_LINK_NAME is set empty to disable the symlinking for image artifacts in deploy, testimage fails, as the path assembly is incorrect.
In that case fallback to IMAGE_NAME

(From OE-Core rev: c7a4e7e294992acc589c62adcaf6cd32659f2f9b)

---
 meta/classes/testimage.bbclass | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
meta/classes/testimage.bbclass +2 -2
index 0241f29dfb..a91cdb9a1f 100644
@@ -98,7 +98,7 @@ TESTIMAGELOCK:qemuall = ""
 
 TESTIMAGE_DUMP_DIR ?= "${LOG_DIR}/runtime-hostdump/"
 
-TESTIMAGE_UPDATE_VARS ?= "DL_DIR WORKDIR DEPLOY_DIR"
+TESTIMAGE_UPDATE_VARS ?= "DL_DIR WORKDIR DEPLOY_DIR IMAGE_LINK_NAME"
 
 testimage_dump_target () {
 }
@@ -209,7 +209,7 @@ def testimage_main(d):
     bb.utils.mkdirhier(d.getVar("TEST_LOG_DIR"))
 
     image_name = ("%s/%s" % (d.getVar('DEPLOY_DIR_IMAGE'),
-                             d.getVar('IMAGE_LINK_NAME')))
+                             d.getVar('IMAGE_LINK_NAME') or d.getVar('IMAGE_NAME')))
 
     tdname = "%s.testdata.json" % image_name
     try:
Signature · 1 line
2.34.1
#2 lore raw

PATCH 3/3 testexport: fallback for empty IMAGE_LINK_NAME

In reply to a message not in the archive

if IMAGE_LINK_NAME is set empty to disable the symlinking for image artifacts in deploy, testexport fails, as the path assembly is incorrect.
In that case fallback to IMAGE_NAME

(From OE-Core rev: 0c1d098e6dd08fa3a5aafca656457ac6badcef89)

---
 meta/classes/testexport.bbclass | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
meta/classes/testexport.bbclass +1 -1
index 1b0fb44a4a..deb68ec6ce 100644
@@ -50,7 +50,7 @@ def testexport_main(d):
     from oeqa.runtime.context import OERuntimeTestContextExecutor
 
     image_name = ("%s/%s" % (d.getVar('DEPLOY_DIR_IMAGE'),
-                             d.getVar('IMAGE_LINK_NAME')))
+                             d.getVar('IMAGE_LINK_NAME') or d.getVar('IMAGE_NAME')))
 
     tdname = "%s.testdata.json" % image_name
     td = json.load(open(tdname, "r"))
Signature · 1 line
2.34.1