File tree Expand file tree Collapse file tree 3 files changed +20
-2
lines changed Expand file tree Collapse file tree 3 files changed +20
-2
lines changed Original file line number Diff line number Diff line change 22
33TUNNEL_LOG=" $LOGS_DIR /browserstack-tunnel.log"
44
5+ # Method that prints the logfile output of the browserstack tunnel.
6+ printLog () {
7+ echo " Logfile output of Browserstack tunnel (${TUNNEL_LOG} ):"
8+ echo " "
9+ cat ${TUNNEL_LOG}
10+ }
11+
512# Wait for Connect to be ready before exiting
613# Time out if we wait for more than 2 minutes, so the process won't run forever.
714let " counter=0"
@@ -10,7 +17,7 @@ let "counter=0"
1017if [ -f $BROWSER_PROVIDER_ERROR_FILE ]; then
1118 echo
1219 echo " An error occurred while starting the tunnel. See error:"
13- cat $TUNNEL_LOG
20+ printLog
1421 exit 5
1522fi
1623
@@ -20,6 +27,7 @@ while [ ! -f $BROWSER_PROVIDER_READY_FILE ]; do
2027 if [ $counter -gt 240 ]; then
2128 echo
2229 echo " Timed out after 2 minutes waiting for tunnel ready file"
30+ printLog
2331 exit 5
2432 fi
2533
Original file line number Diff line number Diff line change @@ -6,7 +6,7 @@ TUNNEL_FILE="sc-4.4.7-linux.tar.gz"
66TUNNEL_URL=" https://saucelabs.com/downloads/${TUNNEL_FILE} "
77TUNNEL_DIR=" /tmp/saucelabs-connect"
88
9- TUNNEL_LOG=" ${LOGS_DIR} /sauce-connect "
9+ TUNNEL_LOG=" ${LOGS_DIR} /saucelabs-tunnel.log "
1010
1111SAUCE_ACCESS_KEY=` echo ${SAUCE_ACCESS_KEY} | rev`
1212
Original file line number Diff line number Diff line change 11#! /bin/bash
22
3+ TUNNEL_LOG=" $LOGS_DIR /saucelabs-tunnel.log"
4+
5+ # Method that prints the logfile output of the saucelabs tunnel.
6+ printLog () {
7+ echo " Logfile output of Saucelabs tunnel (${TUNNEL_LOG} ):"
8+ echo " "
9+ cat ${TUNNEL_LOG}
10+ }
11+
312# Wait for Saucelabs Connect to be ready before exiting
413# Time out if we wait for more than 2 minutes, so the process won't run forever.
514let " counter=0"
@@ -10,6 +19,7 @@ while [ ! -f $BROWSER_PROVIDER_READY_FILE ]; do
1019 if [ $counter -gt 240 ]; then
1120 echo " "
1221 echo " Timed out after 2 minutes waiting for tunnel ready file"
22+ printLog
1323 exit 5
1424 fi
1525
You can’t perform that action at this time.
0 commit comments