Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(683)

Unified Diff: tools/testing/dart/test_options.dart

Issue 256703003: Add default selector exclution flag to test.dart (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 6 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/testing/dart/test_options.dart
===================================================================
--- tools/testing/dart/test_options.dart (revision 35364)
+++ tools/testing/dart/test_options.dart (working copy)
@@ -404,6 +404,13 @@
'Extra options to send to the vm when running',
['--vm-options'],
[],
+ null),
+ new _TestOptionSpecification(
+ 'exclude_suite',
+ 'Exclude suites from default selector, only works when no'
+ ' selector has been specified on the command line',
+ ['--exclude-suite'],
+ defaultTestSelectors,
null),];
}
@@ -676,7 +683,17 @@
var selectors = configuration['selectors'];
if (selectors is !Map) {
if (selectors == null) {
- selectors = defaultTestSelectors;
+ selectors = new List.from(defaultTestSelectors);
+ var exclude_suites = configuration['exclude_suite'] != null ?
+ configuration['exclude_suite'].split(',') : [];
+ for (var exclude in exclude_suites) {
+ if (selectors.contains(exclude)) {
+ selectors.remove(exclude);
+ } else {
+ print("Error: default selectors does not contain $exclude");
+ exit(1);
+ }
+ }
}
Map<String, RegExp> selectorMap = new Map<String, RegExp>();
for (var i = 0; i < selectors.length; i++) {
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698