Set progress report interval for bazel explicitly (#6262)

* set progress internval

* add keep alive

* add keepalive

* remove cat

* smaller time

* squash error

* reduce log spam
This commit is contained in:
Eric Liang
2019-11-24 22:37:59 -08:00
committed by GitHub
parent c8b69727cd
commit 7917bbef78
3 changed files with 34 additions and 3 deletions
Executable
+30
View File
@@ -0,0 +1,30 @@
#!/bin/bash
# Run a command, printing periodically to keep travis alive.
PID=$$
# Print output to avoid travis killing us
watchdog() {
for i in `seq 5 5 150`; do
sleep 300
echo "(running, ${i}m total)"
done
echo "Command timed out after 2.5h, dumping logs:"
echo "TIMED OUT"
kill -SIGKILL $PID
}
watchdog & 2>/dev/null
WATCHDOG_PID=$!
time "$@"
CODE=$?
if [ $CODE != 0 ]; then
echo "FAILED $CODE"
kill $WATCHDOG_PID
exit $CODE
fi
kill $WATCHDOG_PID
exit 0