From bf88a67b45235236d6655dce604e632eb94a813c Mon Sep 17 00:00:00 2001 From: Alexis Lothoré Date: Mon, 12 Aug 2024 17:14:03 +0200 Subject: oeqa/postactions: fix exception handling MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The current exception handler in list_and_fetch_failed_tests_artifacts expects a non-exisiting variable and then fail to display the original exception message since it raises a new one. The issue has been introduced with commit 6e80b2ab660e ("oeqa/utils/postactions: transfer whole archive over ssh instead of doing individual copies"). Now that tests artifacts are now handled individually, there's no point of trying to print individual names in the exception. (From OE-Core rev: 60a7448abce091eb8c1cb953058fade0beb8b670) Signed-off-by: Alexis Lothoré Signed-off-by: Richard Purdie (cherry picked from commit a50e72bb64fb8b0d14c23164eaeeabd9c271ac19) Signed-off-by: Steve Sakoman --- meta/lib/oeqa/utils/postactions.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meta/lib/oeqa/utils/postactions.py b/meta/lib/oeqa/utils/postactions.py index 2a08129d6c..a0e3b70892 100644 --- a/meta/lib/oeqa/utils/postactions.py +++ b/meta/lib/oeqa/utils/postactions.py @@ -71,7 +71,7 @@ def retrieve_test_artifacts(target, artifacts_list, target_dir): raise Exception("Error while fetching compressed artifacts") p = subprocess.run(["tar", "zxf", "-", "-C", local_artifacts_dir], input=output) except Exception as e: - bb.warn(f"Can not retrieve {artifact_path} from test target: {e}") + bb.warn(f"Can not retrieve artifacts from test target: {e}") def list_and_fetch_failed_tests_artifacts(d, tc): artifacts_list = get_artifacts_list(tc.target, d.getVar("TESTIMAGE_FAILED_QA_ARTIFACTS")) -- cgit v1.2.3-54-g00ecf