catch errors in cleanup script

This commit is contained in:
girish@cloudron.io 2016-01-14 13:47:35 -08:00
parent 42f4dbe7e1
commit 42fced747f
1 changed files with 5 additions and 1 deletions

View File

@ -12,7 +12,11 @@ test_logs=()
# cleanup
rm -f logs/*
echo "Cleaning up"
./node_modules/.bin/mocha test/000-cleanup.js > "logs/000-cleanup.log" 2>&1
if ! ./node_modules/.bin/mocha test/000-cleanup.js > "logs/000-cleanup.log" 2>&1; then
echo "Cleanup script failed"
cat "logs/000-cleanup.log"
exit 1
fi
# run tests
for t in "${tests[@]}"; do