]> source.dussan.org Git - jquery-ui.git/commitdiff
Upgrade to node-testswarm 1.0. -alpha works well, tested with QUnit already.
authorJörn Zaefferer <joern.zaefferer@gmail.com>
Fri, 1 Feb 2013 17:44:51 +0000 (18:44 +0100)
committerJörn Zaefferer <joern.zaefferer@gmail.com>
Fri, 1 Feb 2013 17:44:51 +0000 (18:44 +0100)
build/tasks/testswarm.js
package.json

index cbc502bc36ab7c603b5344c84dd3c5a0db569e09..f02c1313880fe109d48b4ffb8a2407070d3b817c 100644 (file)
@@ -33,30 +33,37 @@ var versions = {
                "Widget": "widget/widget.html"
        };
 
-function submit( commit, tests, configFile, version, done ) {
-       var test,
+function submit( commit, runs, configFile, version, 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 ] );
-       }
+               config = grunt.file.readJSON( configFile ).jqueryui;
        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 ' + version + '#<a href="https://github.com/jquery/jquery-ui/commit/' + commit + '">' + commit.substr( 0, 10 ) + '</a>',
-               runMax: config.runMax,
-               "runNames[]": Object.keys( tests ),
-               "runUrls[]": testUrls,
-               "browserSets[]": config.browserSets
-       });
+               timeout: 1000 * 60 * 45
+       } )
+       .addReporter( testswarm.reporters.cli )
+       .auth( {
+               id: config.authUsername,
+               token: config.authToken
+       } )
+       .addjob(
+               {
+                       name: 'jQuery UI ' + version + '#<a href="https://github.com/jquery/jquery-ui/commit/' + commit + '">' + commit.substr( 0, 10 ) + '</a>',
+                       runs: runs,
+                       runMax: config.runMax,
+                       browserSets: config.browserSets
+               }, function( err, passed ) {
+                       if ( err ) {
+                               grunt.log.error( err );
+                       }
+                       done( passed );
+               }
+       );
 }
 
 grunt.registerTask( "testswarm", function( commit, configFile ) {
index e02dac05bdf20096c5acfec400fdd92dc15c7aa9..15fe7daffa541ffa8c23cc80af95702590a29eeb 100644 (file)
@@ -60,7 +60,7 @@
                "grunt-junit": "0.1.5",
                "grunt-git-authors": "1.0.0",
                "rimraf": "2.0.1",
-               "testswarm": "0.3.0"
+               "testswarm": "1.0.0-alpha"
        },
        "keywords": []
 }