From d6ca5b54f721904c4081f2b9d9e20029d50fc0fe Mon Sep 17 00:00:00 2001 From: Peter 'Pita' Martischka Date: Tue, 30 Oct 2012 21:49:04 +0000 Subject: [PATCH] try to build up the sauce labs tunnel, and tear it down after its etablished --- tests/frontend/travis/sauce_tunnel.sh | 26 ++++++++++++++++---------- 1 file changed, 16 insertions(+), 10 deletions(-) mode change 100644 => 100755 tests/frontend/travis/sauce_tunnel.sh diff --git a/tests/frontend/travis/sauce_tunnel.sh b/tests/frontend/travis/sauce_tunnel.sh old mode 100644 new mode 100755 index 20d05a1c1..7e283813a --- a/tests/frontend/travis/sauce_tunnel.sh +++ b/tests/frontend/travis/sauce_tunnel.sh @@ -1,13 +1,19 @@ #!/bin/bash -#download and unzip the sauce connector -echo "hello world" -#curl http://saucelabs.com/downloads/Sauce-Connect-latest.zip > /tmp/sauce.zip -#unzip /tmp/sauce.zip -d /tmp +# download and unzip the sauce connector +curl http://saucelabs.com/downloads/Sauce-Connect-latest.zip > /tmp/sauce.zip +unzip /tmp/sauce.zip -d /tmp -#start the sauce connector in background and make sure it doesn't output the secret key -#(java -jar /tmp/Sauce-Connect.jar $SAUCE_USER $SAUCE_KEY | grep -v $SAUCE_KEY)& +# start the sauce connector in background and make sure it doesn't output the secret key +(java -jar /tmp/Sauce-Connect.jar $SAUCE_USER $SAUCE_KEY -f /tmp/tunnel | grep -v $SAUCE_KEY)& -#save the sauce pid in a file and give it a bit of time to connect -#echo $! > /tmp/sauce.pid -#wait 30 -#kill $! \ No newline at end of file +# save the sauce pid in a file +echo $! > /tmp/sauce.pid + +# wait for the tunnel to build up +while [ ! -e "/tmp/tunnel" ] + do + sleep 1 +done + +echo "READY!!!!" +kill $! \ No newline at end of file