chore(saucelabs): interrupt if saucelabs tunnel does not start (#1747)

This commit is contained in:
Paul Gschwendtner
2016-11-08 21:27:28 +01:00
committed by Jeremy Elbourn
parent 2bab92a2b9
commit 9bb4809f89
2 changed files with 21 additions and 6 deletions
+6 -6
View File
@@ -2,18 +2,18 @@
# Wait for Connect to be ready before exiting
# Time out if we wait for more than 2 minutes, so that we can print logs.
# Time out if we wait for more than 2 minutes, so the process won't run forever.
let "counter=0"
while [ ! -f $BROWSER_PROVIDER_READY_FILE ]; do
let "counter++"
if [ $counter -gt 240 ]; then
echo "Timed out after 2 minutes waiting for browser provider ready file"
# We must manually print logs here because travis will not run
# after_script commands if the failure occurs before the script
# phase.
./scripts/ci/print-logs.sh
echo
echo "Timed out after 2 minutes waiting for tunnel ready file"
exit 5
fi
printf "."
sleep .5
done