From a47f11e80242e3e092283d10817ddb4adadb6ed8 Mon Sep 17 00:00:00 2001 From: Igor Chubin Date: Sat, 11 May 2019 13:08:49 +0200 Subject: [PATCH] run-tests.sh: exitcode depends on the tests status --- tests/run-tests.sh | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/tests/run-tests.sh b/tests/run-tests.sh index 9ca45bd..b8f5a27 100644 --- a/tests/run-tests.sh +++ b/tests/run-tests.sh @@ -48,7 +48,7 @@ while read -r number test_line; do if [ "$test_standalone" = YES ]; then test_line="${test_line//cht.sh /}" - python ../lib/standalone.py "$test_line" > "$TMP" 2> /dev/null + "${PYTHON}" ../lib/standalone.py "$test_line" > "$TMP" 2> /dev/null elif [[ $test_line = "cht.sh "* ]]; then test_line="${test_line//cht.sh /}" eval "bash $CHTSH_SCRIPT $test_line" > "$TMP" @@ -69,4 +69,8 @@ done < "$TMP3" echo TESTS/OK/FAILED "$i/$((i-failed))/$failed" - +if [ "$failed" != 0 ]; then + exit 1 +else + exit 0 +fi