From 42fced747fc2ca601ec6aa891b624301234dbc1a Mon Sep 17 00:00:00 2001 From: "girish@cloudron.io" Date: Thu, 14 Jan 2016 13:47:35 -0800 Subject: [PATCH] catch errors in cleanup script --- parallel_test.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/parallel_test.sh b/parallel_test.sh index de9c7b7..ef6f5a1 100755 --- a/parallel_test.sh +++ b/parallel_test.sh @@ -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