diff --git a/build/tasks/testswarm.js b/build/tasks/testswarm.js
index 5d7425515..c7aeea1de 100644
--- a/build/tasks/testswarm.js
+++ b/build/tasks/testswarm.js
@@ -4,6 +4,7 @@ module.exports = function( grunt ) {
var versions = {
"git": "git",
+ "1.9": "1.9.0 1.9.1",
"1.8": "1.8.0 1.8.1 1.8.2 1.8.3",
"1.7": "1.7 1.7.1 1.7.2",
"1.6": "1.6 1.6.1 1.6.2 1.6.3 1.6.4"
@@ -34,29 +35,39 @@ var versions = {
"Widget": "widget/widget.html"
};
-function submit( commit, tests, configFile, version, done ) {
- var test,
+function submit( commit, runs, configFile, extra, done ) {
+ var testName,
testswarm = require( "testswarm" ),
config = grunt.file.readJSON( configFile ).jqueryui,
- testBase = config.testUrl + commit + "/tests/unit/",
- testUrls = [];
- for ( test in tests ) {
- testUrls.push( testBase + tests[ test ] );
+ commitUrl = "https://github.com/jquery/jquery-ui/commit/" + commit;
+
+ if ( extra ) {
+ extra = " " + extra;
}
- version = version ? ( version + " " ) : "";
- testswarm({
+
+ for ( testName in runs ) {
+ runs[ testName ] = config.testUrl + commit + "/tests/unit/" + runs[ testName ];
+ }
+ testswarm.createClient({
url: config.swarmUrl,
pollInterval: 10000,
- timeout: 1000 * 60 * 45,
- done: done
- }, {
- authUsername: config.authUsername,
- authToken: config.authToken,
- jobName: 'jQuery UI 1-9 ' + version + '#' + commit.substr( 0, 10 ) + '',
+ timeout: 1000 * 60 * 45
+ })
+ .addReporter( testswarm.reporters.cli )
+ .auth({
+ id: config.authUsername,
+ token: config.authToken
+ })
+ .addjob({
+ name: "jQuery UI 1-9 #" + commit.substr( 0, 10 ) + "" + extra,
+ runs: runs,
runMax: config.runMax,
- "runNames[]": Object.keys(tests),
- "runUrls[]": testUrls,
- "browserSets[]": ["popular"]
+ browserSets: config.browserSets
+ }, function( error, passed ) {
+ if ( error ) {
+ grunt.log.error( error );
+ }
+ done( passed );
});
}
@@ -76,7 +87,7 @@ grunt.registerTask( "testswarm-multi-jquery", function( commit, configFile, mino
allTests[ test + "-" + version ] = tests[ test ] + "?nojshint=true&jquery=" + version;
}
});
- submit( commit, allTests, configFile, minor + " core", this.async() );
+ submit( commit, allTests, configFile, "core " + minor, this.async() );
});
};