Skip to content
This repository has been archived by the owner on Oct 8, 2021. It is now read-only.

Commit

Permalink
Tests: Added setting of types and suites via env variables
Browse files Browse the repository at this point in the history
Fixes gh-6917
  • Loading branch information
gseguin committed Jan 16, 2014
1 parent cfc1195 commit a8618c4
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 9 deletions.
20 changes: 16 additions & 4 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,22 @@ branches:
only:
- master
env:
- JQUERIES=1.8.3
- JQUERIES=1.10.2
- JQUERIES=2.0.3
- JQUERIES=git
- TYPES=unit
JQUERIES=1.8.3
- TYPES=unit
JQUERIES=1.10.2
- TYPES=unit
JQUERIES=2.0.3
- TYPES=unit
JQUERIES=git
- TYPES=integration
JQUERIES=1.8.3
- TYPES=integration
JQUERIES=1.10.2
- TYPES=integration
JQUERIES=2.0.3
- TYPES=integration
JQUERIES=git
notifications:
irc:
channels:
Expand Down
17 changes: 12 additions & 5 deletions Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -656,13 +656,20 @@ module.exports = function( grunt ) {
http: {
options: {
urls: (function() {
// Find the test files
var suites = _.without( ( grunt.option( "suites" ) || "" ).split( "," ), "" ),
types = _.without( ( grunt.option( "types" ) || "" ).split( "," ), "" ).sort().reverse(), // So that unit runs before integration
patterns, paths,
var patterns, paths,
suites = ( grunt.option( "suites" ) || process.env.SUITES || "" ).split( "," ),
types = ( grunt.option( "types" ) || process.env.TYPES || "" ).split( "," ),
prefixes = ["tests/unit/", "tests/integration/"],
versionedPaths = [],
jQueries = _.without( ( grunt.option( "jqueries" ) || process.env.JQUERIES || "" ).split( "," ), "" );
jQueries = ( grunt.option( "jqueries" ) || process.env.JQUERIES || "" ).split( "," );

// Trim empties
suites = _.without( suites, "" );
types = _.without( types, "" );
jQueries = _.without( jQueries, "" );

// So that unit suites runs before integration suites
types = types.sort().reverse();

if( types.length ){
prefixes = [];
Expand Down

0 comments on commit a8618c4

Please sign in to comment.