From bc68a6aab9de8a90e07e7eb37283cea194dbe0ae Mon Sep 17 00:00:00 2001 From: ubq323 Date: Sat, 17 Aug 2024 21:30:30 +0100 Subject: hide passing tests by default (there are so many) --- run_tests.sh | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'run_tests.sh') diff --git a/run_tests.sh b/run_tests.sh index e852582..2e2de83 100755 --- a/run_tests.sh +++ b/run_tests.sh @@ -4,6 +4,13 @@ pass=0 fail=0 skip=0 +show_passes=false + +if [ "$1" = "-a" ]; then + show_passes=true + shift +fi + skipglob="$1" @@ -29,7 +36,9 @@ for testfile in tests/*.bth; do echo "$output" | diff "$outfile" - >/dev/null diff_res=$? case $diff_res in - 0) printf '\033[32m\033[1mPASS\033[0m %s\n' "$testname" + 0) if $show_passes; then + printf '\033[32m\033[1mPASS\033[0m %s\n' "$testname" + fi pass=$((pass + 1)) ;; 1) printf '\033[31m\033[1mFAIL\033[0m %s\n' "$testname" printf "\tgot output: %s\n" "$(echo "$output" | head -n4)" -- cgit v1.2.3