diff mbox series

testimage/postactions: Allow artifact collection to be skipped

Message ID 20240708165616.349661-1-richard.purdie@linuxfoundation.org
State Accepted, archived
Commit 7036f814baa6550e0b1ac2db37fcd51960ee9e48
Headers show
Series testimage/postactions: Allow artifact collection to be skipped | expand

Commit Message

Richard Purdie July 8, 2024, 4:56 p.m. UTC
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 | 5 +++++
 1 file changed, 5 insertions(+)

Comments

Peter Hoyes July 9, 2024, 9:31 a.m. UTC | #1
On 7/8/24 17:56, Richard Purdie wrote:
> 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 | 5 +++++
>   1 file changed, 5 insertions(+)
>
> diff --git a/meta/lib/oeqa/utils/postactions.py b/meta/lib/oeqa/utils/postactions.py
> index 2a08129d6c0..15f423218eb 100644
> --- a/meta/lib/oeqa/utils/postactions.py
> +++ b/meta/lib/oeqa/utils/postactions.py
> @@ -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,

Thanks, that does the trick.

Peter
diff mbox series

Patch

diff --git a/meta/lib/oeqa/utils/postactions.py b/meta/lib/oeqa/utils/postactions.py
index 2a08129d6c0..15f423218eb 100644
--- a/meta/lib/oeqa/utils/postactions.py
+++ b/meta/lib/oeqa/utils/postactions.py
@@ -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,