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

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

Issue 18121013: Allow selectors for test.py to match against a subtest of a multitest (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 5 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_suite.dart
diff --git a/tools/testing/dart/test_suite.dart b/tools/testing/dart/test_suite.dart
index 41bdf2feae1fa188abf5f98a6eb426db77523db4..6abfa34aa66f57bf2f2ee4302a0d7abdc95e4820 100644
--- a/tools/testing/dart/test_suite.dart
+++ b/tools/testing/dart/test_suite.dart
@@ -615,11 +615,10 @@ class StandardTestSuite extends TestSuite {
// Only run the tests that match the pattern.
RegExp pattern = configuration['selectors'][suiteName];
- if (!pattern.hasMatch('$filePath')) return;
if (filePath.filename.endsWith('test_config.dart')) return;
var optionsFromFile = readOptionsFromFile(filePath);
- CreateTest createTestCase = makeTestCaseCreator(optionsFromFile);
+ CreateTest createTestCase = makeTestCaseCreator(pattern, optionsFromFile);
if (optionsFromFile['isMultitest']) {
group.add(doMultitest(filePath, buildDir, suiteDir, createTestCase));
kustermann 2013/07/05 08:41:37 doMultitest() will basically call [createTestCase]
@@ -808,23 +807,25 @@ class StandardTestSuite extends TestSuite {
}
}
- CreateTest makeTestCaseCreator(Map optionsFromFile) {
+ CreateTest makeTestCaseCreator(RegExp pattern, Map optionsFromFile) {
return (Path filePath,
bool hasCompileError,
bool hasRuntimeError,
{bool isNegativeIfChecked: false,
bool hasFatalTypeErrors: false,
Set<String> multitestOutcome: null}) {
- // Cache the test information for each test case.
- var info = new TestInformation(filePath,
- optionsFromFile,
- hasCompileError,
- hasRuntimeError,
- isNegativeIfChecked,
- hasFatalTypeErrors,
- multitestOutcome);
- cachedTests.add(info);
- enqueueTestCaseFromTestInformation(info);
+ if (pattern.hasMatch('$filePath')) {
+ // Cache the test information for each test case.
+ var info = new TestInformation(filePath,
+ optionsFromFile,
+ hasCompileError,
+ hasRuntimeError,
+ isNegativeIfChecked,
+ hasFatalTypeErrors,
+ multitestOutcome);
+ cachedTests.add(info);
+ enqueueTestCaseFromTestInformation(info);
+ }
};
}
« 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