From c021cf52d8c075c15e5a6a56224b995b37d5c725 Mon Sep 17 00:00:00 2001 From: Peter 'Pita' Martischka Date: Sun, 28 Oct 2012 16:48:51 +0000 Subject: [PATCH] download and start the sauce connector in travis --- .travis.yml | 9 ++++++++- tests/frontend/travis/sauce_tunnel.sh | 11 +++++++++++ 2 files changed, 19 insertions(+), 1 deletion(-) create mode 100644 tests/frontend/travis/sauce_tunnel.sh diff --git a/.travis.yml b/.travis.yml index 4cb298aee..9ecd541ab 100644 --- a/.travis.yml +++ b/.travis.yml @@ -2,7 +2,14 @@ language: node_js node_js: - "0.8" install: - - bin/installDeps.sh + - "bin/installDeps.sh" +before_script: + - "tests/frontend/travis/sauce_tunnel.sh" +env: + global: + - secure: zGX8AFKQnuh6WWLJw58WnRZiVQ4dIbN0gIQ0NpJIKmzQw2yQ+rqQEo2UoT5p\n+SSX/DJnU0yZzZ2RkiN8sabyY3e3Y2JhjO5GUTdoUxxB7ffCDLM4W1T8ckyl\nmSUW/ajrxMbGxruYbKQfepCRK6w4OoUsROYI0MpeoDo8ngxmcFw=" + - SAUCE_USER: pita + notifications: email: - petermartischka@googlemail.com \ No newline at end of file diff --git a/tests/frontend/travis/sauce_tunnel.sh b/tests/frontend/travis/sauce_tunnel.sh new file mode 100644 index 000000000..02bcb77f5 --- /dev/null +++ b/tests/frontend/travis/sauce_tunnel.sh @@ -0,0 +1,11 @@ +#!/bin/bash +#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 + +#save the sauce pid in a file and give it a bit of time to connect +echo $! > /tmp/sauce.pid +wait 30 \ No newline at end of file