From 0673dc031d35814411341bfaeb8224fbf218216f Mon Sep 17 00:00:00 2001 From: Matthieu Baerts Date: Thu, 29 Jun 2023 18:24:09 +0200 Subject: [PATCH] summary: print only failed subtests With the new support of the selftests, in case of errors, all subtests that have been executed are printed and all the ones for the selftests that have failed are printed again. We don't need that in the summary, we want to focus on what didn't work. We can easily filter them by looking if the result is followed by 'test:' or ' - '. Signed-off-by: Matthieu Baerts --- entrypoint.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/entrypoint.sh b/entrypoint.sh index 23fb657..f1ba2bb 100755 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -984,7 +984,7 @@ _has_failed_tests() { _print_tests_result() { echo "All tests:" - grep --no-filename -e "^ok " -e "^not ok " "${RESULTS_DIR}"/*.tap + grep --no-filename -e "^ok [0-9]\+ test:" -e "^not ok " "${RESULTS_DIR}"/*.tap } _print_failed_tests() { local t @@ -996,7 +996,7 @@ _print_failed_tests() { local t _print_line echo "- $(basename "${t}"):" echo - cat "${t}" + grep -v "^ok [0-9]\+ - " "${t}" fi done _print_line