log more to identify what failed

This commit is contained in:
girish@cloudron.io 2016-01-26 13:38:41 -08:00
parent 228d9365a7
commit 0ad405d0cc
1 changed files with 5 additions and 2 deletions

View File

@ -20,9 +20,9 @@ fi
# run tests
for t in "${tests[@]}"; do
echo "Starting test ${t}"
./node_modules/.bin/mocha "test/${t}.js" > "logs/${t}.log" 2>&1 &
test_pids+=("$!")
echo "Starting test ${t} with pid ${test_pids[-1]}"
test_logs+=("logs/${t}.log")
done
@ -40,7 +40,10 @@ tail_pid=$!
fail=0
echo "Waiting for jobs to finish"
for pid in "${test_pids[@]}"; do
wait $pid || let "fail+=1"
if ! wait $pid; then
let "fail+=1"
echo "$pid failed"
fi
done
kill -9 "${tail_pid}"