From 28f6ffbc42794c64d3dec92e8a2f833bbd38abc0 Mon Sep 17 00:00:00 2001 From: olszomal Date: Tue, 7 Sep 2021 11:45:34 +0200 Subject: [PATCH] Return the number of failed tests from make_tests --- tests/testall.sh | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/tests/testall.sh b/tests/testall.sh index 8a285b2..1b72674 100755 --- a/tests/testall.sh +++ b/tests/testall.sh @@ -19,15 +19,11 @@ make_tests() { /bin/sh $plik 3>&1 2>> "results.log" 1>&2 done count=$(grep -c "Test succeeded" "results.log") - if test $count -ne 0 - then - skip=$(grep -c "Test skipped" "results.log") - fail=$(grep -c "Test failed" "results.log") - printf "%s\n" "testall.sh finished" - printf "%s\n" "summary: success $count, skip $skip, fail $fail" - else # no test was done - result=1 - fi + skip=$(grep -c "Test skipped" "results.log") + fail=$(grep -c "Test failed" "results.log") + printf "%s\n" "testall.sh finished" + printf "%s\n" "summary: success $count, skip $skip, fail $fail" + return $fail } rm -rf "${result_path}"