diff mbox series

testimage/core-image-ptest: Move TESTIMAGE_FAILED_QA_ARTIFACTS setting to image recipe

Message ID 20240717113435.3561492-1-richard.purdie@linuxfoundation.org
State New
Headers show
Series testimage/core-image-ptest: Move TESTIMAGE_FAILED_QA_ARTIFACTS setting to image recipe | expand

Commit Message

Richard Purdie July 17, 2024, 11:34 a.m. UTC
MCNAME isn't defined outside this image so it breaks other images. Move the
code to a better place since wildcards don't yet work in TESTIMAGE_FAILED_QA_ARTIFACTS.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
---
 meta/classes-recipe/testimage.bbclass        | 3 ---
 meta/recipes-core/images/core-image-ptest.bb | 3 +++
 2 files changed, 3 insertions(+), 3 deletions(-)
diff mbox series

Patch

diff --git a/meta/classes-recipe/testimage.bbclass b/meta/classes-recipe/testimage.bbclass
index 72282ac3624..e06c903a425 100644
--- a/meta/classes-recipe/testimage.bbclass
+++ b/meta/classes-recipe/testimage.bbclass
@@ -27,9 +27,6 @@  TESTIMAGE_FAILED_QA_ARTIFACTS = "\
     ${sysconfdir}/version \
     ${sysconfdir}/os-release"
 
-# If some ptests are run and fail, retrieve corresponding directories
-TESTIMAGE_FAILED_QA_ARTIFACTS += "${@bb.utils.contains('DISTRO_FEATURES', 'ptest', '${libdir}/${MCNAME}/ptest', '', d)}"
-
 # You can set (or append to) TEST_SUITES in local.conf to select the tests
 # which you want to run for your target.
 # The test names are the module names in meta/lib/oeqa/runtime/cases.
diff --git a/meta/recipes-core/images/core-image-ptest.bb b/meta/recipes-core/images/core-image-ptest.bb
index 72081f938de..a2f5b92996b 100644
--- a/meta/recipes-core/images/core-image-ptest.bb
+++ b/meta/recipes-core/images/core-image-ptest.bb
@@ -42,3 +42,6 @@  python () {
     if not d.getVar("MCNAME"):
         raise bb.parse.SkipRecipe("No class extension set")
 }
+
+# If some ptests are run and fail, retrieve corresponding directories
+TESTIMAGE_FAILED_QA_ARTIFACTS += "${@bb.utils.contains('DISTRO_FEATURES', 'ptest', '${libdir}/${MCNAME}/ptest', '', d)}"