Grunt: Update testswarm task to use more config properties. Already deployed on Jenkins server

This commit is contained in:
Jörn Zaefferer 2012-06-07 20:36:19 +02:00
parent a86ed30f0a
commit 0344a390b7

View File

@ -131,19 +131,20 @@ module.exports = function( grunt ) {
grunt.registerTask( "testswarm", function( commit, configFile ) { grunt.registerTask( "testswarm", function( commit, configFile ) {
var testswarm = require( "testswarm" ), var testswarm = require( "testswarm" ),
testUrls = []; testUrls = [],
config = grunt.file.readJSON( configFile ).jquery;
var tests = "ajax attributes callbacks core css data deferred dimensions effects event manipulation offset queue selector support traversing".split( " " ); var tests = "ajax attributes callbacks core css data deferred dimensions effects event manipulation offset queue selector support traversing".split( " " );
tests.forEach(function( test ) { tests.forEach(function( test ) {
testUrls.push( "http://swarm.jquery.org/git/jquery/" + commit + "/test/index.html?filter=" + test ); testUrls.push( config.testUrl + commit + "/test/index.html?filter=" + test );
}); });
testswarm({ testswarm({
url: "http://swarm.jquery.org/", url: config.swarmUrl,
pollInterval: 10000, pollInterval: 10000,
timeout: 1000 * 60 * 30, timeout: 1000 * 60 * 30,
done: this.async() done: this.async()
}, { }, {
authUsername: "jquery", authUsername: config.authUsername,
authToken: grunt.file.readJSON( configFile ).jquery.authToken, authToken: config.authToken,
jobName: 'jQuery commit #<a href="https://github.com/jquery/jquery/commit/' + commit + '">' + commit.substr( 0, 10 ) + '</a>', jobName: 'jQuery commit #<a href="https://github.com/jquery/jquery/commit/' + commit + '">' + commit.substr( 0, 10 ) + '</a>',
runMax: 4, runMax: 4,
"runNames[]": tests, "runNames[]": tests,