Skip to content

Commit 5b9e6a4

Browse files
committed
Tests: Renamed TestSwarm jobs.
1 parent cdff8de commit 5b9e6a4

File tree

1 file changed

+24
-21
lines changed

1 file changed

+24
-21
lines changed

build/tasks/testswarm.js

Lines changed: 24 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -33,37 +33,40 @@ var versions = {
3333
"Widget": "widget/widget.html"
3434
};
3535

36-
function submit( commit, runs, configFile, version, done ) {
36+
function submit( commit, runs, configFile, extra, done ) {
3737
var testName,
3838
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+
4146
for ( testName in runs ) {
42-
runs[ testName] = config.testUrl + commit + "/tests/unit/" + runs[ testName ];
47+
runs[ testName ] = config.testUrl + commit + "/tests/unit/" + runs[ testName ];
4348
}
44-
testswarm.createClient( {
49+
testswarm.createClient({
4550
url: config.swarmUrl,
4651
pollInterval: 10000,
4752
timeout: 1000 * 60 * 45
48-
} )
53+
})
4954
.addReporter( testswarm.reporters.cli )
50-
.auth( {
55+
.auth({
5156
id: config.authUsername,
5257
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 );
6567
}
66-
);
68+
done( passed );
69+
});
6770
}
6871

6972
grunt.registerTask( "testswarm", function( commit, configFile ) {
@@ -82,7 +85,7 @@ grunt.registerTask( "testswarm-multi-jquery", function( commit, configFile, mino
8285
allTests[ test + "-" + version ] = tests[ test ] + "?nojshint=true&jquery=" + version;
8386
}
8487
});
85-
submit( commit, allTests, configFile, minor + " core", this.async() );
88+
submit( commit, allTests, configFile, "core " + minor, this.async() );
8689
});
8790

8891
};

0 commit comments

Comments
 (0)