Exit with error code when integration tests fail

This commit is contained in:
Alexander Neumann 2014-11-16 11:34:16 +01:00
parent 9eb0aee05f
commit 53933f6705
1 changed files with 12 additions and 1 deletions

View File

@ -84,8 +84,19 @@ fi
echo "testfiles: $testfiles"
failed=""
for testfile in "$testfiles"; do
current=$(basename "${testfile}" .sh)
bash "${testfile}" && pass "${current} pass" || err "${current} failed!"
if bash "${testfile}"; then
pass "${current} pass"
else
err "${current} failed!"
failed+=" ${current}"
fi
done
if [ -n "$failed" ]; then
err "failed tests: ${failed}"
exit 1
fi