Skip to content

build: print logs if tunnel times out #5279

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 22, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion scripts/browserstack/wait-tunnel.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,13 @@

TUNNEL_LOG="$LOGS_DIR/browserstack-tunnel.log"

# Method that prints the logfile output of the browserstack tunnel.
printLog() {
echo "Logfile output of Browserstack tunnel (${TUNNEL_LOG}):"
echo ""
cat ${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"
Expand All @@ -10,7 +17,7 @@ let "counter=0"
if [ -f $BROWSER_PROVIDER_ERROR_FILE ]; then
echo
echo "An error occurred while starting the tunnel. See error:"
cat $TUNNEL_LOG
printLog
exit 5
fi

Expand All @@ -20,6 +27,7 @@ while [ ! -f $BROWSER_PROVIDER_READY_FILE ]; do
if [ $counter -gt 240 ]; then
echo
echo "Timed out after 2 minutes waiting for tunnel ready file"
printLog
exit 5
fi

Expand Down
2 changes: 1 addition & 1 deletion scripts/saucelabs/start-tunnel.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ TUNNEL_FILE="sc-4.4.7-linux.tar.gz"
TUNNEL_URL="https://saucelabs.com/downloads/${TUNNEL_FILE}"
TUNNEL_DIR="/tmp/saucelabs-connect"

TUNNEL_LOG="${LOGS_DIR}/sauce-connect"
TUNNEL_LOG="${LOGS_DIR}/saucelabs-tunnel.log"

SAUCE_ACCESS_KEY=`echo ${SAUCE_ACCESS_KEY} | rev`

Expand Down
10 changes: 10 additions & 0 deletions scripts/saucelabs/wait-tunnel.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
#!/bin/bash

TUNNEL_LOG="$LOGS_DIR/saucelabs-tunnel.log"

# Method that prints the logfile output of the saucelabs tunnel.
printLog() {
echo "Logfile output of Saucelabs tunnel (${TUNNEL_LOG}):"
echo ""
cat ${TUNNEL_LOG}
}

# Wait for Saucelabs 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"
Expand All @@ -10,6 +19,7 @@ while [ ! -f $BROWSER_PROVIDER_READY_FILE ]; do
if [ $counter -gt 240 ]; then
echo ""
echo "Timed out after 2 minutes waiting for tunnel ready file"
printLog
exit 5
fi

Expand Down