Skip to content

Commit

Permalink
Download and start Sauce Connect manually
Browse files Browse the repository at this point in the history
Disable Travis' own Sauce Labs integration
  • Loading branch information
mislav committed Oct 11, 2015
1 parent eb4aec2 commit b3885b4
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 2 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
.env
bower_components/
node_modules/
sauce_connect/
sauce_connect.log
2 changes: 0 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,6 @@ env:
- SAUCE_PLATFORM="Windows 7" SAUCE_BROWSER="internet explorer" SAUCE_VERSION="11"
- SAUCE_PLATFORM="Windows 7" SAUCE_BROWSER="internet explorer" SAUCE_VERSION="10"
- SAUCE_PLATFORM="Windows 7" SAUCE_BROWSER="internet explorer" SAUCE_VERSION="9"
addons:
sauce_connect: true
deploy:
provider: npm
email: [email protected]
Expand Down
12 changes: 12 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,16 @@ node_modules/:
clean:
rm -rf ./bower_components ./node_modules

ifeq ($(shell uname -s),Darwin)
sauce_connect/bin/sc:
wget https://saucelabs.com/downloads/sc-4.3.11-osx.zip
unzip sc-4.3.11-osx.zip
mv sc-4.3.11-osx sauce_connect
rm sc-4.3.11-osx.zip
else
sauce_connect/bin/sc:
mkdir -p sauce_connect
curl -fsSL http://saucelabs.com/downloads/sc-4.3.11-linux.tar.gz | tar xz -C sauce_connect --strip-components 1
endif

.PHONY: build clean lint test saucelabs travis
10 changes: 10 additions & 0 deletions script/saucelabs
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,16 @@ node ./script/server $port &>/dev/null &
server_pid=$!
trap "kill $server_pid" INT EXIT

make sauce_connect/bin/sc
sauce_ready="${TMPDIR:-/tmp}/sauce-ready.$$"
sauce_connect/bin/sc -u "$SAUCE_USERNAME" -k "$SAUCE_ACCESS_KEY" \
-i "$TRAVIS_JOB_NUMBER" -l sauce_connect.log -f "$sauce_ready" &>/dev/null &
sauce_pid=$!
trap "kill $sauce_pid" INT EXIT

while [ ! -f "$sauce_ready" ]; do sleep .01; done
rm -f "$sauce_ready"

job=$(./script/saucelabs-start "http://localhost:$port/test/test.html")

while true
Expand Down

0 comments on commit b3885b4

Please sign in to comment.