summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSandrine Bailleux <sandrine.bailleux@arm.com>2023-05-05 15:51:28 +0200
committerSandrine Bailleux <sandrine.bailleux@arm.com>2023-05-15 13:02:27 +0200
commit26207c2d33dc0576345e425c05f419cab43a7b48 (patch)
tree0afcc1f52a006ed9bcfb4421ebf3f7ea90aa26f1
parent4eefbf1bf73aed1f48c0dbb06577625d2d0ce953 (diff)
downloadarm-trusted-firmware-26207c2d33dc0576345e425c05f419cab43a7b48.tar.gz
test(tc): return test failures count for tfm-testsuite
When running the "tfm-testsuite" set of platform tests, we now count the number of failed tests (in addition to printing a test summary) and report that back to the caller, i.e. tc_bl31_common_platform_setup(). This will be useful to consolidate the tests failure reporting code in a subsequent patch. Signed-off-by: Sandrine Bailleux <sandrine.bailleux@arm.com> Change-Id: I8e51f03869f3b2f264b6581b3bd2a53be0198057
-rw-r--r--plat/arm/board/tc/rss_ap_tests.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/plat/arm/board/tc/rss_ap_tests.c b/plat/arm/board/tc/rss_ap_tests.c
index 7d254e65a..8c40271ba 100644
--- a/plat/arm/board/tc/rss_ap_tests.c
+++ b/plat/arm/board/tc/rss_ap_tests.c
@@ -60,6 +60,7 @@ void run_platform_tests(void)
{
size_t i;
int ret;
+ int failures = 0;
ret = run_tests();
if (ret != 0) {
@@ -69,7 +70,11 @@ void run_platform_tests(void)
printf("\n\n");
- /* Print a summary of all the tests that had been run. */
+ /*
+ * Print a summary of all the tests that had been run.
+ * Also count the number of tests failure and report that back to the
+ * caller.
+ */
printf("SUMMARY:\n");
for (i = 0; i < ARRAY_SIZE(test_suites); ++i) {
@@ -80,6 +85,7 @@ void run_platform_tests(void)
printf(" %s PASSED.\n", suite->name);
break;
case TEST_FAILED:
+ failures++;
printf(" %s FAILED.\n", suite->name);
break;
case TEST_SKIPPED:
@@ -93,5 +99,5 @@ void run_platform_tests(void)
printf("\n\n");
- return 0;
+ return failures;
}