Skip to content

Commit a8618c4

Browse files
committed
Tests: Added setting of types and suites via env variables
Fixes jquery-archivegh-6917
1 parent cfc1195 commit a8618c4

File tree

2 files changed

+28
-9
lines changed

2 files changed

+28
-9
lines changed

.travis.yml

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,22 @@ branches:
88
only:
99
- master
1010
env:
11-
- JQUERIES=1.8.3
12-
- JQUERIES=1.10.2
13-
- JQUERIES=2.0.3
14-
- JQUERIES=git
11+
- TYPES=unit
12+
JQUERIES=1.8.3
13+
- TYPES=unit
14+
JQUERIES=1.10.2
15+
- TYPES=unit
16+
JQUERIES=2.0.3
17+
- TYPES=unit
18+
JQUERIES=git
19+
- TYPES=integration
20+
JQUERIES=1.8.3
21+
- TYPES=integration
22+
JQUERIES=1.10.2
23+
- TYPES=integration
24+
JQUERIES=2.0.3
25+
- TYPES=integration
26+
JQUERIES=git
1527
notifications:
1628
irc:
1729
channels:

Gruntfile.js

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -656,13 +656,20 @@ module.exports = function( grunt ) {
656656
http: {
657657
options: {
658658
urls: (function() {
659-
// Find the test files
660-
var suites = _.without( ( grunt.option( "suites" ) || "" ).split( "," ), "" ),
661-
types = _.without( ( grunt.option( "types" ) || "" ).split( "," ), "" ).sort().reverse(), // So that unit runs before integration
662-
patterns, paths,
659+
var patterns, paths,
660+
suites = ( grunt.option( "suites" ) || process.env.SUITES || "" ).split( "," ),
661+
types = ( grunt.option( "types" ) || process.env.TYPES || "" ).split( "," ),
663662
prefixes = ["tests/unit/", "tests/integration/"],
664663
versionedPaths = [],
665-
jQueries = _.without( ( grunt.option( "jqueries" ) || process.env.JQUERIES || "" ).split( "," ), "" );
664+
jQueries = ( grunt.option( "jqueries" ) || process.env.JQUERIES || "" ).split( "," );
665+
666+
// Trim empties
667+
suites = _.without( suites, "" );
668+
types = _.without( types, "" );
669+
jQueries = _.without( jQueries, "" );
670+
671+
// So that unit suites runs before integration suites
672+
types = types.sort().reverse();
666673

667674
if( types.length ){
668675
prefixes = [];

0 commit comments

Comments
 (0)