1
+ /*jshint node: true */
1
2
module . exports = function ( grunt ) {
2
3
3
- grunt . registerTask ( "testswarm" , function ( commit , configFile ) {
4
+ var tests = {
5
+ "Accordion" : "accordion/accordion.html" ,
6
+ "Accordion_deprecated" : "accordion/accordion_deprecated.html" ,
7
+ "Autocomplete" : "autocomplete/autocomplete.html" ,
8
+ "Button" : "button/button.html" ,
9
+ "Core" : "core/core.html" ,
10
+ //"datepicker/datepicker.html",
11
+ //"dialog/dialog.html",
12
+ //"draggable/draggable.html",
13
+ //"droppable/droppable.html",
14
+ "Effects" : "effects/effects.html" ,
15
+ "Menu" : "menu/menu.html" ,
16
+ "Position" : "position/position.html" ,
17
+ "Position_deprecated" : "position/position_deprecated.html" ,
18
+ "Progressbar" : "progressbar/progressbar.html" ,
19
+ //"resizable/resizable.html",
20
+ //"selectable/selectable.html",
21
+ //"slider/slider.html",
22
+ //"sortable/sortable.html",
23
+ "Spinner" : "spinner/spinner.html" ,
24
+ "Tabs" : "tabs/tabs.html" ,
25
+ "Tabs_deprecated" : "tabs/tabs_deprecated.html" ,
26
+ "Tooltip" : "tooltip/tooltip.html" ,
27
+ "Widget" : "widget/widget.html"
28
+ } ;
29
+
30
+ function submit ( commit , tests , configFile ) {
4
31
var test ,
5
32
testswarm = require ( "testswarm" ) ,
6
33
config = grunt . file . readJSON ( configFile ) . jqueryui ,
7
34
testBase = config . testUrl + commit + "/tests/unit/" ,
8
- testUrls = [ ] ,
9
- tests = {
10
- "Accordion" : "accordion/accordion.html" ,
11
- "Accordion_deprecated" : "accordion/accordion_deprecated.html" ,
12
- "Autocomplete" : "autocomplete/autocomplete.html" ,
13
- "Button" : "button/button.html" ,
14
- "Core" : "core/core.html" ,
15
- //"datepicker/datepicker.html",
16
- //"dialog/dialog.html",
17
- //"draggable/draggable.html",
18
- //"droppable/droppable.html",
19
- "Effects" : "effects/effects.html" ,
20
- "Menu" : "menu/menu.html" ,
21
- "Position" : "position/position.html" ,
22
- "Position_deprecated" : "position/position_deprecated.html" ,
23
- "Progressbar" : "progressbar/progressbar.html" ,
24
- //"resizable/resizable.html",
25
- //"selectable/selectable.html",
26
- //"slider/slider.html",
27
- //"sortable/sortable.html",
28
- "Spinner" : "spinner/spinner.html" ,
29
- "Tabs" : "tabs/tabs.html" ,
30
- "Tabs_deprecated" : "tabs/tabs_deprecated.html" ,
31
- "Tooltip" : "tooltip/tooltip.html" ,
32
- "Widget" : "widget/widget.html"
33
- } ;
35
+ testUrls = [ ] ;
34
36
for ( test in tests ) {
35
37
testUrls . push ( testBase + tests [ test ] + "?nojshint=true" ) ;
36
38
}
@@ -40,14 +42,30 @@ grunt.registerTask( "testswarm", function( commit, configFile ) {
40
42
timeout : 1000 * 60 * 30 ,
41
43
done : this . async ( )
42
44
} , {
43
- authUsername : "jqueryui" ,
45
+ authUsername : config . authUsername ,
44
46
authToken : config . authToken ,
45
47
jobName : 'jQuery UI commit #<a href="https://github.com/jquery/jquery-ui/commit/' + commit + '">' + commit . substr ( 0 , 10 ) + '</a>' ,
46
48
runMax : config . runMax ,
47
49
"runNames[]" : Object . keys ( tests ) ,
48
50
"runUrls[]" : testUrls ,
49
51
"browserSets[]" : [ "popular" ]
50
52
} ) ;
53
+ }
54
+
55
+ grunt . registerTask ( "testswarm" , function ( commit , configFile ) {
56
+ submit ( commit , tests , configFile ) ;
57
+ } ) ;
58
+
59
+ grunt . registerTask ( "testswarm-multi-jquery" , function ( commit , configFile ) {
60
+ var test ,
61
+ allTests = { } ;
62
+ for ( test in tests ) {
63
+ allTests [ test + "-1.6.3" ] = tests [ test ] + "?nojshint=true&jquery=1.6.3" ;
64
+ }
65
+ for ( test in tests ) {
66
+ allTests [ test + "-1.7.2" ] = tests [ test ] + "?nojshint=true&jquery=1.7.2" ;
67
+ }
68
+ submit ( commit , allTests , configFile ) ;
51
69
} ) ;
52
70
53
71
} ;
0 commit comments