mirror of
https://github.com/angular/angular.git
synced 2026-09-14 13:54:52 +08:00
6534eb0a73
* chore: remove inactive browserstack wrapper package No longer uses the "inactive" browserstack wrapper package from npm, which was just responsible for creating the readyfile. We can create the readyfile ourself and get rid of the npm package. * Fix incorrect comments * Don't wait for tunnel if timer exceeded * Fix race conditions * Add empty line before logging that the tunnel is ready.
29 lines
660 B
Bash
Executable File
29 lines
660 B
Bash
Executable File
#!/bin/bash
|
|
|
|
TUNNEL_LOG="$LOGS_DIR/browserstack-tunnel.log"
|
|
|
|
# Wait for Connect to be ready before exiting
|
|
# Time out if we wait for more than 2 minutes, so the process won't run forever.
|
|
let "counter=0"
|
|
|
|
# Exit the process if there are errors reported. Print the tunnel log to the console.
|
|
if [ -f $BROWSER_PROVIDER_ERROR_FILE ]; then
|
|
echo
|
|
echo "An error occurred while starting the tunnel. See error:"
|
|
cat $TUNNEL_LOG
|
|
exit 5
|
|
fi
|
|
|
|
while [ ! -f $BROWSER_PROVIDER_READY_FILE ]; do
|
|
let "counter++"
|
|
|
|
if [ $counter -gt 240 ]; then
|
|
echo
|
|
echo "Timed out after 2 minutes waiting for tunnel ready file"
|
|
exit 5
|
|
fi
|
|
|
|
printf "."
|
|
sleep .5
|
|
done
|