diff --git a/entrypoint.sh b/entrypoint.sh index 17f8a3c..f65b41a 100755 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -1307,18 +1307,17 @@ _has_failed_tests() { } # $1: prefix -_print_tests_results_subtests() { local tap +_print_tests_results_subtests() { local tap ok="ok" for tap in "${RESULTS_DIR}/${1}"*.tap; do [[ "${tap}" = *"_*.tap" ]] && continue - if ! grep -q "^not ok " "${tap}"; then - echo "ok 1 test: $(basename "${tap}" ".tap")" - fi + grep -q "^not ok " "${tap}" && ok="not ok" + echo "${ok} 1 test: $(basename "${tap}" ".tap")" done } _print_tests_result() { echo "All tests:" - grep --no-filename -e "^ok 1 test: " -e "^not ok " "${RESULTS_DIR}"/*.tap + grep --no-filename -e "^ok [0-9]\+ test: " -e "^not ok " "${RESULTS_DIR}"/*.tap _print_tests_results_subtests "kunit_" _print_tests_results_subtests "packetdrill_" }