Skip to content

Commit

Permalink
Tentative fix for #1274 [take 2]
Browse files Browse the repository at this point in the history
  • Loading branch information
evilaliv3 committed May 15, 2015
1 parent 06f6e26 commit eab375f
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 25 deletions.
53 changes: 29 additions & 24 deletions client/tests/glclient/protractor-sauce.config.js
Original file line number Diff line number Diff line change
@@ -1,27 +1,35 @@
// for each run we need a different port;
//
// for the list of usable ports read:
// - https://docs.saucelabs.com/reference/sauce-connect/
capabilities = [
{ port: "2000", browserName: "firefox", platform: "Linux" },
{ port: "2001", browserName: "firefox", platform: "OS X 10.10" },
{ port: "2020", browserName: "firefox", version: "36.0", platform: "Windows 8.1" },
{ port: "2109", browserName: "firefox", version: "37.0", platform: "Windows 8.1" },
{ port: "2310", browserName: "chrome", platform: "Linux" },
{ port: "3000", browserName: "chrome", platform: "OS X 10.10" },
{ port: "3001", browserName: "chrome", version: "37.0", platform: "Windows 8.1" },
{ port: "3030", browserName: "chrome", version: "38.0", platform: "Windows 8.1" },
{ port: "3210", browserName: "chrome", version: "39.0", platform: "Windows 8.1" },
{ port: "3333", browserName: "chrome", version: "40.0", platform: "Windows 8.1" },
{ port: "4000", browserName: "chrome", version: "41.0", platform: "Windows 8.1" },
{ port: "4001", browserName: "chrome", version: "42.0", platform: "Windows 8.1" },
{ port: "4040", browserName: "safari", platform: "OS X 10.10" },
{ port: "4321", browserName: "internet explorer", version: "11", platform: "Windows 8.1" }
]

for (i in capabilities) {
capabilities[i]['name'] = 'GlobaLeaks Travis Test using Protractor';
capabilities[i]['tunnel-identifier'] = process.env.TRAVIS_JOB_NUMBER;
capabilities[i]['build'] = process.env.TRAVIS_BUILD_NUMBER;
}

exports.config = {
sauceUser: process.env.SAUCE_USERNAME,
sauceKey: process.env.SAUCE_ACCESS_KEY,

// for each run we need a different port;
//
// for the list of usable ports read:
// - https://docs.saucelabs.com/reference/sauce-connect/
multiCapabilities: [
{ port: "2000", browserName: "firefox", platform: "Linux" },
{ port: "2001", browserName: "firefox", platform: "OS X 10.10" },
{ port: "2020", browserName: "firefox", version: "36.0", platform: "Windows 8.1" },
{ port: "2109", browserName: "firefox", version: "37.0", platform: "Windows 8.1" },
{ port: "2310", browserName: "chrome", platform: "Linux" },
{ port: "3000", browserName: "chrome", platform: "OS X 10.10" },
{ port: "3001", browserName: "chrome", version: "37.0", platform: "Windows 8.1" },
{ port: "3030", browserName: "chrome", version: "38.0", platform: "Windows 8.1" },
{ port: "3210", browserName: "chrome", version: "39.0", platform: "Windows 8.1" },
{ port: "3333", browserName: "chrome", version: "40.0", platform: "Windows 8.1" },
{ port: "4000", browserName: "chrome", version: "41.0", platform: "Windows 8.1" },
{ port: "4001", browserName: "chrome", version: "42.0", platform: "Windows 8.1" },
{ port: "4040", browserName: "safari", platform: "OS X 10.10" },
{ port: "4321", browserName: "internet explorer", version: "11", platform: "Windows 8.1" }
],
multiCapabilities: capabilities,

maxSessions: -1, // full ammo!

Expand All @@ -47,10 +55,7 @@ exports.config = {
onPrepare: function() {
// hack needed in order to change the baseUrl at each run
browser.getProcessedConfig().then(function(config) {
config.baseUrl = 'http://127.0.0.1:' + config.capabilities.port + '/';
config.capabilities['name'] = 'GlobaLeaks Travis Test using Protractor';
config.capabilities['tunnel-identifier'] = process.env.TRAVIS_JOB_NUMBER;
config.capabilities['build'] = process.env.TRAVIS_BUILD_NUMBER;
webdriver.base.url = 'http://127.0.0.1:' + config.capabilities.port + '/';
});
}
};
2 changes: 1 addition & 1 deletion scripts/travis_saucelabs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ ports=( 2000 2001 2020 2109 2222 2310 3000 3001 3030 3210 3333 4000 4001 4040 43
for i in "${ports[@]}"
do
RUNDIR=$TRAVIS_BUILD_DIR-$i
cp $TRAVIS_BUILD_DIR $RUNYDIR -r
cp $TRAVIS_BUILD_DIR $RUNDIR -r
$RUNDIR/backend/bin/globaleaks -z travis -c -k9 --port i
done

Expand Down

0 comments on commit eab375f

Please sign in to comment.