From 303ef33e7df712a71634eb703646aff7df88a1bf Mon Sep 17 00:00:00 2001 From: Sandrine Bailleux Date: Fri, 5 May 2023 15:59:00 +0200 Subject: [PATCH] test(tc): unify platform tests traces Add some traces at the start and end of platform tests. These traces are the same regardless of the set of platform tests we run (NV counter tests / TF-M testsuite / future set of tests). This makes it easier to integrate these tests in the CI because we can now have a unified "expect" script for all platform tests, instead of having one dedicated "expect" script for each possible set of tests. Signed-off-by: Sandrine Bailleux Change-Id: I5ec30a7a25d8a9a4a90e3338a9789acff7ad4843 --- plat/arm/board/tc/tc_bl31_setup.c | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/plat/arm/board/tc/tc_bl31_setup.c b/plat/arm/board/tc/tc_bl31_setup.c index 184791edc..33e460140 100644 --- a/plat/arm/board/tc/tc_bl31_setup.c +++ b/plat/arm/board/tc/tc_bl31_setup.c @@ -52,12 +52,21 @@ void bl31_early_platform_setup2(u_register_t arg0, u_register_t arg1, #ifdef PLATFORM_TESTS static __dead2 void tc_run_platform_tests(void) { + int tests_failed; + + printf("\nStarting platform tests...\n"); + #ifdef PLATFORM_TEST_NV_COUNTERS - nv_counter_test(); + tests_failed = nv_counter_test(); #elif PLATFORM_TEST_TFM_TESTSUITE - run_platform_tests(); + tests_failed = run_platform_tests(); #endif + + printf("Platform tests %s.\n", + (tests_failed != 0) ? "failed" : "succeeded"); + /* Suspend booting, no matter the tests outcome. */ + printf("Suspend booting...\n"); plat_error_handler(-1); } #endif -- 2.39.5