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

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

Issue 8772007: Allow single-dash options to be specified without a space before value. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Add warning on overriding selectors Created 9 years 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 | « tools/testing/dart/test_options.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/testing/dart/test_suite.dart
diff --git a/tools/testing/dart/test_suite.dart b/tools/testing/dart/test_suite.dart
index 594c2d684d86f0271413516db8210d4014ff7b0c..fdb0d2443faac4af2be360f85cc47e3e754c91a1 100644
--- a/tools/testing/dart/test_suite.dart
+++ b/tools/testing/dart/test_suite.dart
@@ -69,13 +69,11 @@ class CCTestSuite implements TestSuite {
receiveTestName.close();
doDone(true);
} else {
- // If patterns are given only list the files that match one of the
- // patterns. Use the name "suiteName/testName" for cc tests.
- var patterns = configuration['patterns'];
- if (!patterns.isEmpty()) {
- var constructedName = '$suiteName/$testName';
- if (!patterns.some((re) => re.hasMatch(constructedName))) return;
- }
+ // Only run the tests that match the pattern. Use the name
+ // "suiteName/testName" for cc tests.
+ RegExp pattern = configuration['selectors'][suiteName];
+ String constructedName = '$suiteName/$testName';
+ if (!pattern.hasMatch(constructedName)) return;
var expectations = testExpectations.expectations(testName);
@@ -124,6 +122,7 @@ class CCTestSuite implements TestSuite {
class StandardTestSuite implements TestSuite {
Map configuration;
+ String suiteName;
String directoryPath;
List<String> statusFilePaths;
Function doTest;
@@ -134,6 +133,7 @@ class StandardTestSuite implements TestSuite {
TestExpectations testExpectations;
StandardTestSuite(Map this.configuration,
+ String this.suiteName,
String this.directoryPath,
List<String> this.statusFilePaths) {
shellPath = TestUtils.dartShellFileName(configuration) ;
@@ -178,14 +178,9 @@ class StandardTestSuite implements TestSuite {
void processFile(String filename) {
if (!isTestFile(filename)) return;
- // If patterns are given only list the files that match one of the
- // patterns.
- var patterns = configuration['patterns'];
- if (!patterns.isEmpty() &&
- !patterns.some((re) => re.hasMatch(filename))) {
- return;
- }
-
+ // Only run the tests that match the pattern.
+ RegExp pattern = configuration['selectors'][suiteName];
+ if (!pattern.hasMatch(filename)) return;
var timeout = configuration['timeout'];
var optionsFromFile = optionsFromFile(filename);
« no previous file with comments | « tools/testing/dart/test_options.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698