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

View file

@ -84,8 +84,19 @@ fi
echo "testfiles: $testfiles" echo "testfiles: $testfiles"
failed=""
for testfile in "$testfiles"; do for testfile in "$testfiles"; do
current=$(basename "${testfile}" .sh) 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 done
if [ -n "$failed" ]; then
err "failed tests: ${failed}"
exit 1
fi