2
2
mirror of https://github.com/octoleo/restic.git synced 2024-12-22 10:58:55 +00:00

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"
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