Chromium Code Reviews| Index: tools/testing/dart/test_options.dart |
| diff --git a/tools/testing/dart/test_options.dart b/tools/testing/dart/test_options.dart |
| index 44f0837968ab7543186fce5f14904c81a69e2f5f..ca8835f7bd88693616d98882f0dfbde237da7e43 100644 |
| --- a/tools/testing/dart/test_options.dart |
| +++ b/tools/testing/dart/test_options.dart |
| @@ -4,6 +4,8 @@ |
| #library("test_options_parser"); |
| +List<String> defaultTestSelectors = const ['standalone', 'corelib']; |
| + |
| /** |
| * Specification of a single test option. |
| * |
| @@ -140,7 +142,7 @@ class TestOptionsParser { |
| // The option name does not start with '-' or '--' so we |
| // assume that the rest of the arguments specify tests or test |
| // suites to run. |
| - configuration['rest'] = arguments.getRange(i, numArguments - i); |
| + configuration['patterns'] = arguments.getRange(i, numArguments - i); |
| return _expandConfigurations(configuration); |
| } |
| // Find the option specification for the name. |
| @@ -195,6 +197,20 @@ class TestOptionsParser { |
| configuration['component'] = 'vm,dartc'; |
| } |
| + // Expand the test selectors into simple regular expressions to be |
| + // used on the full path of a test file. If no selectors are |
| + // explicitly given use the default suite patterns. |
| + List<String> patterns = configuration['patterns']; |
| + if (patterns == null) { |
| + patterns = new List.from(defaultTestSelectors); |
| + } |
| + for (var i = 0; i < patterns.length; i++) { |
| + patterns[i] = patterns[i].replaceAll('*', '.*'); |
| + patterns[i] = patterns[i].replaceAll('/', '.*'); |
| + patterns[i] = new RegExp(patterns[i]); |
|
Bill Hesse
2011/11/14 11:22:10
patterns has type List<String>.
Mads Ager (google)
2011/11/14 11:25:38
Yes, thanks!
|
| + } |
| + configuration['patterns'] = patterns; |
| + |
| // Expand the architectures. |
| var archs = configuration['architecture']; |
| if (archs.contains(',')) { |