]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core-contrib.git/commitdiff
testimage/postactions: Allow artifact collection to be skipped
authorRichard Purdie <richard.purdie@linuxfoundation.org>
Mon, 8 Jul 2024 16:54:31 +0000 (17:54 +0100)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Wed, 10 Jul 2024 09:51:48 +0000 (10:51 +0100)
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.

Allow this by setting TESTIMAGE_FAILED_QA_ARTIFACTS to an empty
value.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/lib/oeqa/utils/postactions.py

index 2a08129d6c02e7c3bf015345de7ca700befd928b..15f423218ebc701932530bbd741d3ff40d20c1bf 100644 (file)
@@ -86,6 +86,11 @@ def list_and_fetch_failed_tests_artifacts(d, tc):
 ##################################################################
 
 def run_failed_tests_post_actions(d, tc):
+    artifacts = d.getVar("TESTIMAGE_FAILED_QA_ARTIFACTS")
+    # Allow all the code to be disabled by having no artifacts set, e.g. for systems with no ssh support
+    if not artifacts:
+        return
+
     post_actions=[
         create_artifacts_directory,
         list_and_fetch_failed_tests_artifacts,