bail if something fails in the middle
This commit is contained in:
parent
7cfa3a0075
commit
c78cee1884
@ -12,7 +12,7 @@ test_logs=()
|
||||
# cleanup
|
||||
rm -f logs/*
|
||||
echo "Cleaning up"
|
||||
if ! ./node_modules/.bin/mocha test/000-cleanup.js > "logs/000-cleanup.log" 2>&1; then
|
||||
if ! ./node_modules/.bin/mocha --bail test/000-cleanup.js > "logs/000-cleanup.log" 2>&1; then
|
||||
echo "Cleanup script failed"
|
||||
cat "logs/000-cleanup.log"
|
||||
exit 1
|
||||
@ -20,7 +20,7 @@ fi
|
||||
|
||||
# run tests
|
||||
for t in "${tests[@]}"; do
|
||||
./node_modules/.bin/mocha "test/${t}.js" > "logs/${t}.log" 2>&1 &
|
||||
./node_modules/.bin/mocha --bail "test/${t}.js" > "logs/${t}.log" 2>&1 &
|
||||
test_pids+=("$!")
|
||||
echo "Starting test ${t} with pid ${test_pids[-1]}"
|
||||
test_logs+=("logs/${t}.log")
|
||||
@ -28,7 +28,7 @@ done
|
||||
|
||||
# update test modifies release file, so run it separately
|
||||
sleep 20 # wait for the other tests to have created the cloudron
|
||||
./node_modules/.bin/mocha "test/cloudron-update-test.js" > "logs/cloudron-update-test.log" 2>&1 &
|
||||
./node_modules/.bin/mocha --bail "test/cloudron-update-test.js" > "logs/cloudron-update-test.log" 2>&1 &
|
||||
test_pids+=("$!")
|
||||
echo "Starting test cloudron-update-test with pid ${test_pids[-1]}"
|
||||
test_logs+=("logs/cloudron-update-test.log")
|
||||
|
Loading…
Reference in New Issue
Block a user