Fix test runner's exit status

This commit is contained in:
2013-10-03 23:01:57 +01:00
parent 64413e301e
commit 7bec498a13

View File

@@ -22,9 +22,11 @@ abs_dirname() {
testdir="$(abs_dirname "$0")" testdir="$(abs_dirname "$0")"
testfiles="$(find "$testdir" -name "*-test.sh")" testfiles="$(find "$testdir" -name "*-test.sh")"
RET=0
for testfile in $testfiles; do for testfile in $testfiles; do
echo "running: ${testfile/#$(dirname "$testdir")\//}" echo "running: ${testfile/#$(dirname "$testdir")\//}"
cd "$(dirname "$testfile")" cd "$(dirname "$testfile")"
"$testfile" "$testfile"
echo "" if [ "$?" != "0" ]; then RET=1; fi
done done
exit $RET