aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZhangjin Wu <[email protected]>2023-07-06 17:03:34 +0800
committerWilly Tarreau <[email protected]>2023-08-23 04:40:22 +0200
commitc0315c79aaa23958fbe82c218be2ba3635749769 (patch)
tree7e58a4f1c45454e75bba4a9db452572efc03fb7b
parent148e9718e2a288ef4fee16089cb9555414052fbb (diff)
selftests/nolibc: report: print a summarized test status
one of the test status: success, warning and failure is printed to summarize the passed, skipped and failed values. - "success" means no skipped and no failed. - "warning" means has at least one skipped and no failed. - "failure" means all tests are failed. Suggested-by: Willy Tarreau <[email protected]> Link: https://lore.kernel.org/lkml/[email protected]/ Signed-off-by: Zhangjin Wu <[email protected]> Signed-off-by: Willy Tarreau <[email protected]>
-rw-r--r--tools/testing/selftests/nolibc/Makefile3
1 files changed, 2 insertions, 1 deletions
diff --git a/tools/testing/selftests/nolibc/Makefile b/tools/testing/selftests/nolibc/Makefile
index d408b688b291..84b9a46ad678 100644
--- a/tools/testing/selftests/nolibc/Makefile
+++ b/tools/testing/selftests/nolibc/Makefile
@@ -85,7 +85,8 @@ CFLAGS ?= -Os -fno-ident -fno-asynchronous-unwind-tables -std=c89 \
LDFLAGS := -s
REPORT ?= awk '/\[OK\][\r]*$$/{p++} /\[FAIL\][\r]*$$/{f++;print} /\[SKIPPED\][\r]*$$/{s++} \
- END{ printf("%d test(s) passed, %d skipped, %d failed.\n", p, s, f); \
+ END{ printf("%d test(s) passed, %d skipped, %d failed => status: ", p, s, f); \
+ if (f) printf("failure\n"); else if (s) printf("warning\n"); else printf("success\n");; \
printf("See all results in %s\n", ARGV[1]); }'
help: