diff options
author | Phil Sutter <phil@nwl.cc> | 2024-12-12 13:47:33 +0100 |
---|---|---|
committer | Jozsef Kadlecsik <kadlec@netfilter.org> | 2024-12-15 17:08:42 +0100 |
commit | 5872aeda8b0ff70d45bc0cb844e86d0795f08fe9 (patch) | |
tree | f749b0fb500eb8fa647496a727aae8f2be889b29 | |
parent | 37f77108fd6cd314690e2c59d7f04825441d9c20 (diff) |
tests: runtest.sh: Keep running, print summary of failed tests
Do not exit at each failure.
Signed-off-by: Phil Sutter <phil@nwl.cc>
Signed-off-by: Jozsef Kadlecsik <kadlec@netfilter.org>
-rwxr-xr-x | tests/runtest.sh | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/tests/runtest.sh b/tests/runtest.sh index 7afa1dd..fc4fd3c 100755 --- a/tests/runtest.sh +++ b/tests/runtest.sh @@ -76,6 +76,7 @@ fi # Make sure the scripts are executable chmod a+x check_* *.sh +failcount=0 for types in $tests; do $ipset -X test >/dev/null 2>&1 if [ -f $types ]; then @@ -116,7 +117,8 @@ for types in $tests; do echo "FAILED" echo "Failed test: $cmd" cat .foo.err - exit 1 + let "failcount++" + break fi # sleep 1 done < $filename @@ -136,5 +138,9 @@ for x in $tests; do done rmmod ip_set >/dev/null 2>&1 rm -f .foo* -echo "All tests are passed" - +if [ "$failcount" -eq 0 ]; then + echo "All tests are passed" +else + echo "$failcount tests have failed" + exit 1 +fi |