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"
"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 + '#<a href="https://github.com/jquery/jquery-ui/commit/' + commit + '">' + commit.substr( 0, 10 ) + '</a>',
+ timeout: 1000 * 60 * 45
+ })
+ .addReporter( testswarm.reporters.cli )
+ .auth({
+ id: config.authUsername,
+ token: config.authToken
+ })
+ .addjob({
+ name: "jQuery UI 1-9 #<a href='" + commitUrl + "'>" + commit.substr( 0, 10 ) + "</a>" + 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 );
});
}
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() );
});
};