diff mbox series

[v2,07/15] selftests/nolibc: report failure if no testcase passed

Message ID 20240807-nolibc-llvm-v2-7-c20f2f5fc7c2@weissschuh.net (mailing list archive)
State Accepted
Commit ddae1d7fab8c5dc5d12da120dc410c4f374d37c3
Headers show
Series tools/nolibc: improve LLVM/clang support | expand

Commit Message

Thomas Weißschuh Aug. 7, 2024, 9:51 p.m. UTC
When nolibc-test is so broken, it doesn't even start,
don't report success.

Signed-off-by: Thomas Weißschuh <linux@weissschuh.net>
Reviewed-by: Shuah Khan <skhan@linuxfoundation.org>
---
 tools/testing/selftests/nolibc/Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/tools/testing/selftests/nolibc/Makefile b/tools/testing/selftests/nolibc/Makefile
index 3fbabab46958..46dfbb50fae5 100644
--- a/tools/testing/selftests/nolibc/Makefile
+++ b/tools/testing/selftests/nolibc/Makefile
@@ -157,7 +157,7 @@  LDFLAGS :=
 
 REPORT  ?= awk '/\[OK\][\r]*$$/{p++} /\[FAIL\][\r]*$$/{if (!f) printf("\n"); f++; print;} /\[SKIPPED\][\r]*$$/{s++} \
 		END{ printf("\n%3d test(s): %3d passed, %3d skipped, %3d failed => status: ", p+s+f, p, s, f); \
-		if (f) printf("failure\n"); else if (s) printf("warning\n"); else printf("success\n");; \
+		if (f || !p) printf("failure\n"); else if (s) printf("warning\n"); else printf("success\n");; \
 		printf("\nSee all results in %s\n", ARGV[1]); }'
 
 help: