mirror of https://github.com/restic/restic.git
Exit with error code when integration tests fail
This commit is contained in:
parent
9eb0aee05f
commit
53933f6705
13
test/run.sh
13
test/run.sh
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue