From c601eae7f675c9fd2e5a83ad3883aad8af8f9233 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Micha=C5=82=20Go=C5=82e=CC=A8biowski?= Date: Tue, 11 Mar 2014 21:12:39 +0100 Subject: [PATCH] Build: Allow to specify timeout in the testswarm task (cherry-picked from a81dbc4ed82bc38b1ac5f6a8242e044232ea1594) --- build/tasks/testswarm.js | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/build/tasks/testswarm.js b/build/tasks/testswarm.js index 0c1e3796d..3b5164212 100644 --- a/build/tasks/testswarm.js +++ b/build/tasks/testswarm.js @@ -2,7 +2,7 @@ module.exports = function( grunt ) { "use strict"; - grunt.registerTask( "testswarm", function( commit, configFile, browserSets ) { + grunt.registerTask( "testswarm", function( commit, configFile, browserSets, timeout ) { var jobName, testswarm = require( "testswarm" ), runs = {}, @@ -11,10 +11,6 @@ module.exports = function( grunt ) { config = grunt.file.readJSON( configFile ).jquery, tests = grunt.config([ this.name, "tests" ]); - if ( !browserSets ) { - browserSets = [ "popular", "ios" ]; - } - if ( pull ) { jobName = "Pull #" + pull[ 1 ] + ""; @@ -30,7 +26,7 @@ module.exports = function( grunt ) { testswarm.createClient( { url: config.swarmUrl, pollInterval: 10000, - timeout: 1000 * 60 * 30 + timeout: timeout || 1000 * 60 * 30 } ) .addReporter( testswarm.reporters.cli ) .auth( { @@ -42,7 +38,7 @@ module.exports = function( grunt ) { name: jobName, runs: runs, runMax: config.runMax, - browserSets: browserSets + browserSets: browserSets || [ "popular", "ios" ] }, function( err, passed ) { if ( err ) { grunt.log.error( err ); -- 2.39.5