Build: Allow to specify timeout in the testswarm task

parent 14872941
...@@ -2,7 +2,7 @@ module.exports = function( grunt ) { ...@@ -2,7 +2,7 @@ module.exports = function( grunt ) {
"use strict"; "use strict";
grunt.registerTask( "testswarm", function( commit, configFile, browserSets ) { grunt.registerTask( "testswarm", function( commit, configFile, browserSets, timeout ) {
var jobName, var jobName,
testswarm = require( "testswarm" ), testswarm = require( "testswarm" ),
runs = {}, runs = {},
...@@ -11,10 +11,6 @@ module.exports = function( grunt ) { ...@@ -11,10 +11,6 @@ module.exports = function( grunt ) {
config = grunt.file.readJSON( configFile ).jquery, config = grunt.file.readJSON( configFile ).jquery,
tests = grunt.config([ this.name, "tests" ]); tests = grunt.config([ this.name, "tests" ]);
if ( !browserSets ) {
browserSets = [ "popular-no-old-ie", "ios" ];
}
if ( pull ) { if ( pull ) {
jobName = "Pull <a href='https://github.com/jquery/jquery/pull/" + jobName = "Pull <a href='https://github.com/jquery/jquery/pull/" +
pull[ 1 ] + "'>#" + pull[ 1 ] + "</a>"; pull[ 1 ] + "'>#" + pull[ 1 ] + "</a>";
...@@ -30,7 +26,7 @@ module.exports = function( grunt ) { ...@@ -30,7 +26,7 @@ module.exports = function( grunt ) {
testswarm.createClient( { testswarm.createClient( {
url: config.swarmUrl, url: config.swarmUrl,
pollInterval: 10000, pollInterval: 10000,
timeout: 1000 * 60 * 30 timeout: timeout || 1000 * 60 * 30
} ) } )
.addReporter( testswarm.reporters.cli ) .addReporter( testswarm.reporters.cli )
.auth( { .auth( {
...@@ -42,7 +38,7 @@ module.exports = function( grunt ) { ...@@ -42,7 +38,7 @@ module.exports = function( grunt ) {
name: jobName, name: jobName,
runs: runs, runs: runs,
runMax: config.runMax, runMax: config.runMax,
browserSets: browserSets browserSets: browserSets || [ "popular-no-old-ie", "ios" ]
}, function( err, passed ) { }, function( err, passed ) {
if ( err ) { if ( err ) {
grunt.log.error( err ); grunt.log.error( err );
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment