From 2e8833733201d9b0d84c5587386443b9c22181d6 Mon Sep 17 00:00:00 2001 From: Felipe Zimmerle Date: Tue, 14 Jan 2020 14:40:25 -0300 Subject: [PATCH] Test suite: improvements --- test/test-suite.sh | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/test/test-suite.sh b/test/test-suite.sh index ff8924b7..e242c7ba 100755 --- a/test/test-suite.sh +++ b/test/test-suite.sh @@ -11,14 +11,30 @@ FILE=${@: -1} if [[ $FILE == *"test-cases/regression/"* ]] then AMOUNT=$(./regression_tests countall ../$FILE) + RET=$? + if [ $RET -ne 0 ]; then + echo ":test-result: SKIP: json is not enabled. (regression/$RET) ../$FILE:$i" + exit 0 + fi + for i in `seq 1 $AMOUNT`; do $VALGRIND $PARAM ./regression_tests ../$FILE:$i - if [ $? -eq 139 ]; then - echo ":test-result: FAIL segfault: ../$FILE:$i" + RET=$? + if [ $RET -ne 0 ]; then + echo ":test-result: FAIL possible segfault/$RET: ../$FILE:$i" fi echo $VALGRIND $PARAM ./regression_tests ../$FILE:$i done; else $VALGRIND $PARAM ./unit_tests ../$FILE + RET=$? + if [ $RET -eq 127 ] + then + echo ":test-result: SKIP: json is not enabled. (unit/$RET) ../$FILE" + elif [ $RET -ne 0 ] + then + echo ":test-result: FAIL possible segfault: (unit/$RET) ../$FILE" + fi fi + cd - 1> /dev/null