Skip to content
Permalink
Browse files

Try to get tests running on SL again

  • Loading branch information
c0bra committed Dec 9, 2014
1 parent 150f147 commit aa475064e88c6e76ff203f11c2b30e01b86f7a7e
Showing with 30 additions and 9 deletions.
  1. +3 −2 .travis.yml
  2. +3 −4 lib/grunt/plugins.js
  3. +10 −1 lib/grunt/utils.js
  4. +14 −2 test/karma.conf.js
@@ -35,9 +35,10 @@ branches:
before_install:
- "export CHROME_BIN=chromium-browser"

install:
- npm config set spin false

before_script:
- echo "TRAVIS_PULL_REQUEST $TRAVIS_PULL_REQUEST ${TRAVIS_PULL_REQUEST}"
- echo "TRAVIS_BRANCH $TRAVIS_BRANCH ${TRAVIS_BRANCH}"
- git fetch --tags
- chmod +x ./lib/sauce/sauce_connect_setup.sh ./lib/sauce/sauce_connect_block.sh ./travis_build.sh ./travis_print_logs.sh
- export DISPLAY=:99.0
@@ -82,16 +82,14 @@ module.exports = function(grunt) {
// Run multiple tests serially, but continue if one of them fails.
// Adapted from http://stackoverflow.com/questions/16487681/gruntfile-getting-error-codes-from-programs-serially
grunt.registerTask('serialsauce', function(){
// util.travisFoldStart('serialsauce');

var options = grunt.config('serialsauce');

var done = this.async();

var tasks = {}; options.map(function(t) { tasks[t] = 0 });

// console.log('options', this.options());

// grunt.task.run(options);

var success = true;
grunt.util.async.forEachSeries(Object.keys(tasks),
function(task, next) {
@@ -108,6 +106,7 @@ module.exports = function(grunt) {
});
},
function() {
// util.travisFoldEnd('serialsauce');
done(success);
});
});
@@ -323,6 +323,15 @@ var util = module.exports = {
return v;
}
}
}
},

travisFoldStart: function (msg) {
if (!msg) { return; }
grunt.log.writeln('travis_fold:start:' + msg);
},

travisFoldEnd: function (msg) {
if (!msg) { return; }
grunt.log.writeln('travis_fold:end:' + msg);
}
};
@@ -94,6 +94,9 @@ module.exports = function(config) {
username: 'nggrid',
startConnect: false,
testName: 'ui-grid unit tests',
options: {
'selenium-version': '2.41.0' // NOTE: trying this to see if tests run better
}
},

// For more browsers on Sauce Labs see:
@@ -105,11 +108,13 @@ module.exports = function(config) {
// TODO(c0bra): remove once SauceLabs supports websockets.
// This speeds up the capturing a bit, as browsers don't even try to use websocket. -- (thanks vojta)
if (process.env.TRAVIS) {
config.logLevel = config.LOG_DEBUG;
config.logLevel = config.LOG_INFO;
config.browserNoActivityTimeout: 120000; // NOTE: from angular.js, for socket.io buffer
config.reporters = ['dots', 'coverage'];

var buildLabel = 'TRAVIS #' + process.env.TRAVIS_BUILD_NUMBER + ' (' + process.env.TRAVIS_BUILD_ID + ')';

config.transports = ['websocket', 'xhr-polling'];
// config.transports = ['websocket', 'xhr-polling'];

config.sauceLabs.build = buildLabel;
config.sauceLabs.startConnect = false;
@@ -122,6 +127,13 @@ module.exports = function(config) {
type: 'file',
filename: process.env.LOGS_DIR + '/' + ('karma.log')
});


// NOTE: From angular.js project, only applies to SauceLabs -- (thanks Vojta again)
// Allocating a browser can take pretty long (eg. if we are out of capacity and need to wait
// for another build to finish) and so the `captureTimeout` typically kills
// an in-queue-pending request, which makes no sense.
config.captureTimeout = 0;
}

if (grunt.option('browsers')) {

0 comments on commit aa47506

Please sign in to comment.
You can’t perform that action at this time.