aboutsummaryrefslogtreecommitdiffstats
path: root/build
diff options
context:
space:
mode:
authorMichał Gołębiowski <m.goleb@gmail.com>2014-04-15 11:34:02 +0200
committerMichał Gołębiowski <m.goleb@gmail.com>2014-04-15 11:45:22 +0200
commita43000a185762d9bdf55bf59576117adccb6f7f6 (patch)
tree2e90456b47bdae76a8858405bae654df7204203b /build
parent0f3cb601ad36461128f055ba117c598d028ad335 (diff)
downloadjquery-a43000a185762d9bdf55bf59576117adccb6f7f6.tar.gz
jquery-a43000a185762d9bdf55bf59576117adccb6f7f6.zip
Build: use browserSets from config file; allow to override
(cherry-picked from 7869891a97eae93699cc239274e73e53daedf781)
Diffstat (limited to 'build')
-rw-r--r--build/tasks/testswarm.js15
1 files changed, 10 insertions, 5 deletions
diff --git a/build/tasks/testswarm.js b/build/tasks/testswarm.js
index f6fd8e750..91abf2794 100644
--- a/build/tasks/testswarm.js
+++ b/build/tasks/testswarm.js
@@ -2,7 +2,8 @@ module.exports = function( grunt ) {
"use strict";
- grunt.registerTask( "testswarm", function( commit, configFile, projectName ) {
+ grunt.registerTask( "testswarm", function( commit, configFile, projectName, browserSets,
+ timeout ) {
var jobName, config, tests,
testswarm = require( "testswarm" ),
runs = {},
@@ -11,6 +12,12 @@ module.exports = function( grunt ) {
projectName = projectName || "jquery";
config = grunt.file.readJSON( configFile )[ projectName ];
+ browserSets = browserSets || config.browserSets;
+ if ( browserSets[ 0 ] === "[" ) {
+ // We got an array, parse it
+ browserSets = JSON.parse( browserSets );
+ }
+ timeout = timeout || 1000 * 60 * 30;
tests = grunt.config([ this.name, "tests" ]);
if ( pull ) {
@@ -38,10 +45,8 @@ module.exports = function( grunt ) {
name: jobName,
runs: runs,
runMax: config.runMax,
- browserSets: projectName === "jqueryweekly" ?
- "weekly" :
- [ "popular", "ios" ],
- timeout: projectName === "jqueryweekly" ? 1000 * 60 * 60 : 1000 * 60 * 30
+ browserSets: browserSets,
+ timeout: timeout
}, function( err, passed ) {
if ( err ) {
grunt.log.error( err );