forked from TrueCloudLab/restic
Exit with error code when integration tests fail
This commit is contained in:
parent
9eb0aee05f
commit
53933f6705
1 changed files with 12 additions and 1 deletions
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 a new issue