diff options
Diffstat (limited to 'run_tests.sh')
-rwxr-xr-x | run_tests.sh | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/run_tests.sh b/run_tests.sh index fe5f068..a5ebb81 100755 --- a/run_tests.sh +++ b/run_tests.sh @@ -9,11 +9,12 @@ XFAILS="$PWD/test/xfails" test_fail() { t="$(basename $1)" + reason="$2" if grep -q "$t" "$XFAILS" ; then - echo -e '[\e[34;1mXFAIL\e[0m]'" $t" + echo -e '[\e[34;1mXFAIL\e[0m]'" $t: $reason" ((t_xfail++)) else - echo -e '[\e[31;1mFAIL\e[0m]'" $t" + echo -e '[\e[31;1mFAIL\e[0m]'" $t: $reason" ((t_fail++)) fi } @@ -26,8 +27,9 @@ test_pass() { for t in test/*-* ; do pushd "$t" >/dev/null - if ! "$SOLVER" >/dev/null ; then - test_fail "$t" + reason="$("$SOLVER" 2>&1 1>/dev/null)" + if [ "$?" -ne 0 ]; then + test_fail "$t" "$reason" else test_pass "$t" fi |