aboutsummaryrefslogtreecommitdiffstats
path: root/build
diff options
context:
space:
mode:
authorMichał Gołębiowski <m.goleb@gmail.com>2014-03-16 04:09:12 +0100
committerMichał Gołębiowski <m.goleb@gmail.com>2014-03-16 04:14:03 +0100
commitaa951a3184fc02551bfcb8381cdac28298432419 (patch)
tree4211a74faa2f74516e4d14ad278ef5855f7244ae /build
parentc29e9c4db18738f7bfeb6b4a8019121a9079beb6 (diff)
downloadjquery-aa951a3184fc02551bfcb8381cdac28298432419.tar.gz
jquery-aa951a3184fc02551bfcb8381cdac28298432419.zip
Build: Refactor testswarm Grunt task options
Add a possibility to specify the project name. Infer browserSets & timeout out of it instead of defining it in the Jenkins configuration.
Diffstat (limited to 'build')
-rw-r--r--build/tasks/testswarm.js18
1 files changed, 11 insertions, 7 deletions
diff --git a/build/tasks/testswarm.js b/build/tasks/testswarm.js
index 3de7a089b..c4839ae60 100644
--- a/build/tasks/testswarm.js
+++ b/build/tasks/testswarm.js
@@ -2,14 +2,16 @@ module.exports = function( grunt ) {
"use strict";
- grunt.registerTask( "testswarm", function( commit, configFile, browserSets, timeout ) {
- var jobName,
+ grunt.registerTask( "testswarm", function( commit, configFile, projectName ) {
+ var jobName, config, tests,
testswarm = require( "testswarm" ),
runs = {},
done = this.async(),
- pull = /PR-(\d+)/.exec( commit ),
- config = grunt.file.readJSON( configFile ).jquery,
- tests = grunt.config([ this.name, "tests" ]);
+ pull = /PR-(\d+)/.exec( commit );
+
+ projectName = projectName || "jquery";
+ config = grunt.file.readJSON( configFile )[ projectName ];
+ tests = grunt.config([ this.name, "tests" ]);
if ( pull ) {
jobName = "Pull <a href='https://github.com/jquery/jquery/pull/" +
@@ -36,8 +38,10 @@ module.exports = function( grunt ) {
name: jobName,
runs: runs,
runMax: config.runMax,
- browserSets: browserSets || [ "popular-no-old-ie", "ios" ],
- timeout: timeout || 1000 * 60 * 30
+ browserSets: projectName === "jquery" ?
+ [ "popular-no-old-ie", "ios" ] :
+ "weekly-no-old-ie",
+ timeout: projectName === "jquery" ? 1000 * 60 * 30 : 1000 * 60 * 60 * 4
}, function( err, passed ) {
if ( err ) {
grunt.log.error( err );