diff options
author | Felix Nagel <info@felixnagel.com> | 2013-02-09 03:29:10 +0100 |
---|---|---|
committer | Felix Nagel <info@felixnagel.com> | 2013-02-09 03:29:10 +0100 |
commit | a7b4f29cea06607264c2ba98cd93f4e039cce5bd (patch) | |
tree | 1ac9e210ce8fd16a85cb1d3283983475b27437ed /build | |
parent | b81bb0b983687b1efc09577bf128b8a5b7aa5d7b (diff) | |
parent | ab408c9b82430e7a65a9269441cc0c0e2af95770 (diff) | |
download | jquery-ui-a7b4f29cea06607264c2ba98cd93f4e039cce5bd.tar.gz jquery-ui-a7b4f29cea06607264c2ba98cd93f4e039cce5bd.zip |
Merge branch 'master' into selectmenu
Diffstat (limited to 'build')
-rw-r--r-- | build/tasks/testswarm.js | 50 |
1 files changed, 28 insertions, 22 deletions
diff --git a/build/tasks/testswarm.js b/build/tasks/testswarm.js index 0f23b3505..55653649e 100644 --- a/build/tasks/testswarm.js +++ b/build/tasks/testswarm.js @@ -4,7 +4,7 @@ module.exports = function( grunt ) { var versions = { "git": "git", - "1.9": "1.9.0", + "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,31 +34,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, - // TODO don't merge this to master, or undo it - jobName: 'jQuery UI / Selectmenu ' + 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 ) { |