It does not always make sense to collect artifacts and data from the target on failure, e.g. if testing firmware or if the target is not running an SSH server.
Introduce the variable TESTIMAGE_RUN_FAILURE_POST_ACTIONS, which defaults to "1". If this variable is not true, skip the failed test post actions. Signed-off-by: Peter Hoyes <[email protected]> --- meta/classes-recipe/testimage.bbclass | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/meta/classes-recipe/testimage.bbclass b/meta/classes-recipe/testimage.bbclass index ed0d87b7a7..599a5563a5 100644 --- a/meta/classes-recipe/testimage.bbclass +++ b/meta/classes-recipe/testimage.bbclass @@ -18,9 +18,11 @@ inherit image-artifact-names TESTIMAGE_AUTO ??= "0" -# When any test fails, TESTIMAGE_FAILED_QA ARTIFACTS will be parsed and for -# each entry in it, if artifact pointed by path description exists on target, -# it will be retrieved onto host +# When any test fails, if TESTIMAGE_RUN_FAILURE_POST_ACTIONS equals "1", +# TESTIMAGE_FAILED_QA ARTIFACTS will be parsed and for each entry in it, if artifact +# pointed by path description exists on target, it will be retrieved onto host + +TESTIMAGE_RUN_FAILURE_POST_ACTIONS ??= "1" TESTIMAGE_FAILED_QA_ARTIFACTS = "\ ${localstatedir}/log \ @@ -367,7 +369,7 @@ def testimage_main(d): pass results = tc.runTests() complete = True - if results.hasAnyFailingTest(): + if oe.types.boolean(d.getVar('TESTIMAGE_RUN_FAILURE_POST_ACTIONS')) and results.hasAnyFailingTest(): run_failed_tests_post_actions(d, tc) except (KeyboardInterrupt, BlockingIOError) as err: if isinstance(err, KeyboardInterrupt): -- 2.34.1
-=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#201155): https://lists.openembedded.org/g/openembedded-core/message/201155 Mute This Topic: https://lists.openembedded.org/mt/106886598/21656 Group Owner: [email protected] Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [[email protected]] -=-=-=-=-=-=-=-=-=-=-=-
