diff --git a/meta/classes-recipe/testimage.bbclass b/meta/classes-recipe/testimage.bbclass
index 72282ac362..47060c00bc 100644
--- a/meta/classes-recipe/testimage.bbclass
+++ b/meta/classes-recipe/testimage.bbclass
@@ -22,14 +22,11 @@ TESTIMAGE_AUTO ??= "0"
 # each entry in it, if artifact pointed by path description exists on target,
 # it will be retrieved onto host
 
-TESTIMAGE_FAILED_QA_ARTIFACTS = "\
+TESTIMAGE_FAILED_QA_ARTIFACTS ??= "\
     ${localstatedir}/log \
     ${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 72081f938d..2b965c927b 100644
--- a/meta/recipes-core/images/core-image-ptest.bb
+++ b/meta/recipes-core/images/core-image-ptest.bb
@@ -42,3 +42,4 @@ python () {
     if not d.getVar("MCNAME"):
         raise bb.parse.SkipRecipe("No class extension set")
 }
+
