@@ -33,37 +33,40 @@ var versions = {
33
33
"Widget" : "widget/widget.html"
34
34
} ;
35
35
36
- function submit ( commit , runs , configFile , version , done ) {
36
+ function submit ( commit , runs , configFile , extra , done ) {
37
37
var testName ,
38
38
testswarm = require ( "testswarm" ) ,
39
- config = grunt . file . readJSON ( configFile ) . jqueryui ;
40
- version = version ? ( version + " " ) : "" ;
39
+ config = grunt . file . readJSON ( configFile ) . jqueryui ,
40
+ commitUrl = "https://github.com/jquery/jquery-ui/commit/" + commit ;
41
+
42
+ if ( extra ) {
43
+ extra = " " + extra ;
44
+ }
45
+
41
46
for ( testName in runs ) {
42
- runs [ testName ] = config . testUrl + commit + "/tests/unit/" + runs [ testName ] ;
47
+ runs [ testName ] = config . testUrl + commit + "/tests/unit/" + runs [ testName ] ;
43
48
}
44
- testswarm . createClient ( {
49
+ testswarm . createClient ( {
45
50
url : config . swarmUrl ,
46
51
pollInterval : 10000 ,
47
52
timeout : 1000 * 60 * 45
48
- } )
53
+ } )
49
54
. addReporter ( testswarm . reporters . cli )
50
- . auth ( {
55
+ . auth ( {
51
56
id : config . authUsername ,
52
57
token : config . authToken
53
- } )
54
- . addjob (
55
- {
56
- name : "jQuery UI " + version + "#<a href='https://github.com/jquery/jquery-ui/commit/" + commit + "'>" + commit . substr ( 0 , 10 ) + "</a>" ,
57
- runs : runs ,
58
- runMax : config . runMax ,
59
- browserSets : config . browserSets
60
- } , function ( err , passed ) {
61
- if ( err ) {
62
- grunt . log . error ( err ) ;
63
- }
64
- done ( passed ) ;
58
+ } )
59
+ . addjob ( {
60
+ name : "jQuery UI #<a href='" + commitUrl + "'>" + commit . substr ( 0 , 10 ) + "</a>" + extra ,
61
+ runs : runs ,
62
+ runMax : config . runMax ,
63
+ browserSets : config . browserSets
64
+ } , function ( error , passed ) {
65
+ if ( error ) {
66
+ grunt . log . error ( error ) ;
65
67
}
66
- ) ;
68
+ done ( passed ) ;
69
+ } ) ;
67
70
}
68
71
69
72
grunt . registerTask ( "testswarm" , function ( commit , configFile ) {
@@ -82,7 +85,7 @@ grunt.registerTask( "testswarm-multi-jquery", function( commit, configFile, mino
82
85
allTests [ test + "-" + version ] = tests [ test ] + "?nojshint=true&jquery=" + version ;
83
86
}
84
87
} ) ;
85
- submit ( commit , allTests , configFile , minor + " core" , this . async ( ) ) ;
88
+ submit ( commit , allTests , configFile , " core " + minor , this . async ( ) ) ;
86
89
} ) ;
87
90
88
91
} ;
0 commit comments