@@ -34,37 +34,40 @@ var versions = {
3434 "Widget" : "widget/widget.html"
3535 } ;
3636
37- function submit ( commit , runs , configFile , version , done ) {
37+ function submit ( commit , runs , configFile , extra , done ) {
3838 var testName ,
3939 testswarm = require ( "testswarm" ) ,
40- config = grunt . file . readJSON ( configFile ) . jqueryui ;
41- version = version ? ( version + " " ) : "" ;
40+ config = grunt . file . readJSON ( configFile ) . jqueryui ,
41+ commitUrl = "https://github.com/jquery/jquery-ui/commit/" + commit ;
42+
43+ if ( extra ) {
44+ extra = " " + extra ;
45+ }
46+
4247 for ( testName in runs ) {
43- runs [ testName ] = config . testUrl + commit + "/tests/unit/" + runs [ testName ] ;
48+ runs [ testName ] = config . testUrl + commit + "/tests/unit/" + runs [ testName ] ;
4449 }
45- testswarm . createClient ( {
50+ testswarm . createClient ( {
4651 url : config . swarmUrl ,
4752 pollInterval : 10000 ,
4853 timeout : 1000 * 60 * 45
49- } )
54+ } )
5055 . addReporter ( testswarm . reporters . cli )
51- . auth ( {
56+ . auth ( {
5257 id : config . authUsername ,
5358 token : config . authToken
54- } )
55- . addjob (
56- {
57- name : 'jQuery UI ' + version + '#<a href="https://github.com/jquery/jquery-ui/commit/' + commit + '">' + commit . substr ( 0 , 10 ) + '</a>' ,
58- runs : runs ,
59- runMax : config . runMax ,
60- browserSets : config . browserSets
61- } , function ( err , passed ) {
62- if ( err ) {
63- grunt . log . error ( err ) ;
64- }
65- done ( passed ) ;
59+ } )
60+ . addjob ( {
61+ name : "jQuery UI #<a href='" + commitUrl + "'>" + commit . substr ( 0 , 10 ) + "</a>" + extra ,
62+ runs : runs ,
63+ runMax : config . runMax ,
64+ browserSets : config . browserSets
65+ } , function ( error , passed ) {
66+ if ( error ) {
67+ grunt . log . error ( error ) ;
6668 }
67- ) ;
69+ done ( passed ) ;
70+ } ) ;
6871}
6972
7073grunt . registerTask ( "testswarm" , function ( commit , configFile ) {
@@ -83,7 +86,7 @@ grunt.registerTask( "testswarm-multi-jquery", function( commit, configFile, mino
8386 allTests [ test + "-" + version ] = tests [ test ] + "?nojshint=true&jquery=" + version ;
8487 }
8588 } ) ;
86- submit ( commit , allTests , configFile , minor + " core" , this . async ( ) ) ;
89+ submit ( commit , allTests , configFile , " core " + minor , this . async ( ) ) ;
8790} ) ;
8891
8992} ;
0 commit comments