Skip to content

Commit

Permalink
feat(config): Option to exclude test for specific capability
Browse files Browse the repository at this point in the history
Add the option to exclude spec files for a specific capability.
This way you can ignore spec files for one capability only.
For example if the test is known to fail in the capability.

Closes angular#1230
  • Loading branch information
Henk van den Brink authored and Henk van den Brink committed Sep 25, 2014
1 parent 60a4fe1 commit 815b874
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
5 changes: 4 additions & 1 deletion docs/referenceConf.js
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,10 @@ exports.config = {
maxInstances: 1,

// Additional spec files to be run on this capability only.
specs: ['spec/chromeOnlySpec.js']
specs: ['spec/chromeOnlySpec.js'],

//Exclude spec files for this capability.
exclude: ['spec/doNotRunInChromeSpec.js']
},

// If you would like to run more than one instance of WebDriver on the same
Expand Down
8 changes: 8 additions & 0 deletions lib/taskScheduler.js
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,14 @@ var TaskScheduler = function(config) {
capabilitySpecs = capabilitySpecs.concat(capabilitySpecificSpecs);
}

if(capability.exclude) {
var capabilitySpecExcludes = ConfigParser.resolveFilePatterns(
capability.exclude, true, config.configDir);
capabilitySpecs = ConfigParser.resolveFilePatterns(
capabilitySpecs).filter(function (path) {
return capabilitySpecExcludes.indexOf(path) < 0;
});
}
var specLists = [];
// If we shard, we return an array of one element arrays, each containing
// the spec file. If we don't shard, we return an one element array
Expand Down

0 comments on commit 815b874

Please sign in to comment.