diff options
author | Michał Gołębiowski <m.goleb@gmail.com> | 2014-03-16 04:09:12 +0100 |
---|---|---|
committer | Michał Gołębiowski <m.goleb@gmail.com> | 2014-03-16 04:14:48 +0100 |
commit | c84835633a50c72660a36ad2dd1b28b99d73c03d (patch) | |
tree | e95fa140a52c1eb0f44bbda7330e88483a0ca342 | |
parent | 045aeda1e3ca0e3c7b8bf01f03c5e70150134d62 (diff) | |
download | jquery-c84835633a50c72660a36ad2dd1b28b99d73c03d.tar.gz jquery-c84835633a50c72660a36ad2dd1b28b99d73c03d.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.
(cherry-picked from aa951a3184fc02551bfcb8381cdac28298432419)
-rw-r--r-- | build/tasks/testswarm.js | 18 |
1 files changed, 11 insertions, 7 deletions
diff --git a/build/tasks/testswarm.js b/build/tasks/testswarm.js index fbf030f0c..e01b761e2 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", "ios" ], - timeout: timeout || 1000 * 60 * 30 + browserSets: projectName === "jquery" ? + [ "popular", "ios" ] : + "weekly", + timeout: projectName === "jquery" ? 1000 * 60 * 30 : 1000 * 60 * 60 * 4 }, function( err, passed ) { if ( err ) { grunt.log.error( err ); |