Chromium Code Reviews| 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 |
|
Bill Hesse
2011/12/02 10:21:05
Are you only allowing one pattern per suite? What
Mads Ager (google)
2011/12/02 10:36:53
If you want that you probably have a failure and w
|
| + // "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); |