From 0f216dd0fa5b88c7746c2d85f7db24a69f199434 Mon Sep 17 00:00:00 2001 From: Alexis Lothoré Date: Tue, 20 Feb 2024 14:33:12 +0100 Subject: testimage: log exception when failing to retrieve artifacts MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Despite managing to retrieve the failed ptests artifacts, testimage seems to dump some retrieval errors like the following one: WARNING: core-image-ptest-valgrind-1.0-r0 do_testimage: Can not retrieve /usr/lib/valgrind/ptest from test target Log the corresponding exception to help analyzing such issue (From OE-Core rev: 12873e5b1620414a76e4a0e87cc2c806a0513cfe) Signed-off-by: Alexis Lothoré Signed-off-by: Richard Purdie --- meta/classes-recipe/testimage.bbclass | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/meta/classes-recipe/testimage.bbclass b/meta/classes-recipe/testimage.bbclass index 281de4784f..d076102f96 100644 --- a/meta/classes-recipe/testimage.bbclass +++ b/meta/classes-recipe/testimage.bbclass @@ -208,8 +208,8 @@ def retrieve_test_artifacts(target, artifacts_list, target_dir): dest_dir = os.path.join(local_artifacts_dir, os.path.dirname(artifact_path[1:])) os.makedirs(dest_dir, exist_ok=True) target.copyFrom(artifact_path, dest_dir) - except: - bb.warn(f"Can not retrieve {artifact_path} from test target") + except Exception as e: + bb.warn(f"Can not retrieve {artifact_path} from test target: {e}") def testimage_main(d): import os -- cgit v1.2.3-54-g00ecf