Skip to content

Commit 46f5096

Browse files
committed
(build) Prevent Travis from killing the build while running tests.
1 parent 7d885e7 commit 46f5096

2 files changed

Lines changed: 12 additions & 1 deletion

File tree

build/run-tests.sh

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,12 @@ tns platform add android
2121
find node_modules/ -iname '*.gz' -delete
2222

2323
wait "$EMULATOR_STARTER_PID"
24-
tns test android | tee test-output.txt
2524

25+
# generate some output while running tests to prevent Travis from killing the build
26+
"$PROJECT_DIR/build/test-output-generator.sh" &
27+
OUTPUT_GENERATOR_PID=$!
28+
tns test android | tee test-output.txt
29+
kill $OUTPUT_GENERATOR_PID
2630
if grep -q -E 'BUILD FAILED' test-output.txt ; then
2731
echo "TEST BUILD FAILED!"
2832
exit 1

build/test-output-generator.sh

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
#!/bin/sh
2+
set -e
3+
4+
while true; do
5+
sleep 30
6+
echo "Still running, sleeping another 30s."
7+
done

0 commit comments

Comments
 (0)