Test: Set testswarm.runMax from config file

This commit is contained in:
Timo Tijhof 2012-06-11 21:46:06 +02:00 committed by Scott González
parent f0d4da8903
commit 6752994014

View File

@ -3,6 +3,7 @@ module.exports = function( grunt ) {
grunt.registerTask( "testswarm", function( commit, configFile ) { grunt.registerTask( "testswarm", function( commit, configFile ) {
var test, var test,
testswarm = require( "testswarm" ), testswarm = require( "testswarm" ),
config = grunt.file.readJSON( configFile ).jqueryui,
testBase = "http://swarm.jquery.org/git/jquery-ui/" + commit + "/tests/unit/", testBase = "http://swarm.jquery.org/git/jquery-ui/" + commit + "/tests/unit/",
testUrls = [], testUrls = [],
tests = { tests = {
@ -40,9 +41,9 @@ grunt.registerTask( "testswarm", function( commit, configFile ) {
done: this.async() done: this.async()
}, { }, {
authUsername: "jqueryui", authUsername: "jqueryui",
authToken: grunt.file.readJSON( configFile ).jqueryui.authToken, authToken: config.authToken,
jobName: 'jQuery UI commit #<a href="https://github.com/jquery/jquery-ui/commit/' + commit + '">' + commit.substr( 0, 10 ) + '</a>', jobName: 'jQuery UI commit #<a href="https://github.com/jquery/jquery-ui/commit/' + commit + '">' + commit.substr( 0, 10 ) + '</a>',
runMax: 3, runMax: config.runMax,
"runNames[]": Object.keys(tests), "runNames[]": Object.keys(tests),
"runUrls[]": testUrls, "runUrls[]": testUrls,
"browserSets[]": ["popular"] "browserSets[]": ["popular"]