mirror of
https://github.com/jquery/jquery.git
synced 2024-11-23 02:54:22 +00:00
Build: use browserSets from config file; allow to override
This commit is contained in:
parent
99d735ab46
commit
7869891a97
@ -2,7 +2,8 @@ module.exports = function( grunt ) {
|
|||||||
|
|
||||||
"use strict";
|
"use strict";
|
||||||
|
|
||||||
grunt.registerTask( "testswarm", function( commit, configFile, projectName ) {
|
grunt.registerTask( "testswarm", function( commit, configFile, projectName, browserSets,
|
||||||
|
timeout ) {
|
||||||
var jobName, config, tests,
|
var jobName, config, tests,
|
||||||
testswarm = require( "testswarm" ),
|
testswarm = require( "testswarm" ),
|
||||||
runs = {},
|
runs = {},
|
||||||
@ -11,6 +12,12 @@ module.exports = function( grunt ) {
|
|||||||
|
|
||||||
projectName = projectName || "jquery";
|
projectName = projectName || "jquery";
|
||||||
config = grunt.file.readJSON( configFile )[ projectName ];
|
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" ]);
|
tests = grunt.config([ this.name, "tests" ]);
|
||||||
|
|
||||||
if ( pull ) {
|
if ( pull ) {
|
||||||
@ -38,10 +45,8 @@ module.exports = function( grunt ) {
|
|||||||
name: jobName,
|
name: jobName,
|
||||||
runs: runs,
|
runs: runs,
|
||||||
runMax: config.runMax,
|
runMax: config.runMax,
|
||||||
browserSets: projectName === "jqueryweekly" ?
|
browserSets: browserSets,
|
||||||
"weekly-no-old-ie" :
|
timeout: timeout
|
||||||
[ "popular-no-old-ie", "ios" ],
|
|
||||||
timeout: projectName === "jqueryweekly" ? 1000 * 60 * 60 : 1000 * 60 * 30
|
|
||||||
}, function( err, passed ) {
|
}, function( err, passed ) {
|
||||||
if ( err ) {
|
if ( err ) {
|
||||||
grunt.log.error( err );
|
grunt.log.error( err );
|
||||||
|
Loading…
Reference in New Issue
Block a user