tail -f all the log files
This commit is contained in:
parent
3ef3b9ca8e
commit
0c1d7c177e
@ -6,6 +6,8 @@ export DEBUG=superagent-sync,e2e:*
|
|||||||
export DEBUG_COLORS=true
|
export DEBUG_COLORS=true
|
||||||
|
|
||||||
readonly tests=(app-flow-test cloudron-user-test new-user-test)
|
readonly tests=(app-flow-test cloudron-user-test new-user-test)
|
||||||
|
test_pids=()
|
||||||
|
test_logs=()
|
||||||
|
|
||||||
# cleanup
|
# cleanup
|
||||||
rm -f logs/*
|
rm -f logs/*
|
||||||
@ -16,17 +18,24 @@ echo "Cleaning up"
|
|||||||
for t in "${tests[@]}"; do
|
for t in "${tests[@]}"; do
|
||||||
echo "Starting test ${t}"
|
echo "Starting test ${t}"
|
||||||
./node_modules/.bin/mocha "test/${t}.js" > "logs/${t}.log" 2>&1 &
|
./node_modules/.bin/mocha "test/${t}.js" > "logs/${t}.log" 2>&1 &
|
||||||
|
test_pids+=("$!")
|
||||||
|
test_logs+=("logs/${t}.log")
|
||||||
done
|
done
|
||||||
|
|
||||||
# update test modifies release file, so run it separately
|
# update test modifies release file, so run it separately
|
||||||
sleep 20 # wait for the other tests to have created the cloudron
|
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 "test/cloudron-update-test.js" > "logs/cloudron-update-test.log" 2>&1 &
|
||||||
|
test_pids+=("$!")
|
||||||
|
test_logs+=("logs/cloudron-update-test.log")
|
||||||
|
|
||||||
|
# stream all the logs
|
||||||
|
tail -f "${test_logs[*]}" &
|
||||||
|
|
||||||
# wait for tests to finish
|
# wait for tests to finish
|
||||||
fail=0
|
fail=0
|
||||||
echo "Waiting for jobs to finish"
|
echo "Waiting for jobs to finish"
|
||||||
for job in `jobs -p`; do
|
for pid in "${test_pids[@]}"; do
|
||||||
wait $job || let "fail+=1"
|
wait $pid || let "fail+=1"
|
||||||
done
|
done
|
||||||
|
|
||||||
echo
|
echo
|
||||||
|
Loading…
Reference in New Issue
Block a user