From: Michał Gołębiowski Date: Sun, 16 Mar 2014 03:09:12 +0000 (+0100) Subject: Build: Refactor testswarm Grunt task options X-Git-Tag: 1.11.1-beta1~20 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=c84835633a50c72660a36ad2dd1b28b99d73c03d;p=jquery.git 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) --- 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