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 2349a24f0cbf28a673bae5647ad771de15f82de2..e5e48a0061e75b01263d4006a179643b0dcdc13c 100644 |
| --- a/tools/testing/dart/test_suite.dart |
| +++ b/tools/testing/dart/test_suite.dart |
| @@ -128,6 +128,8 @@ class StandardTestSuite implements TestSuite { |
| List<String> statusFilePaths; |
| Function doTest; |
| Function doDone; |
| + int activeMultitests = 0; |
| + bool listingDone = false; |
| String shellPath; |
| TestExpectations testExpectations; |
| @@ -146,7 +148,7 @@ class StandardTestSuite implements TestSuite { |
| void forEachTest(Function onTest, [Function onDone = null]) { |
| doTest = onTest; |
| - doDone = (ignore) => (onDone != null) ? onDone() : null; |
| + doDone = (onDone != null) ? onDone : (() => null); |
| // Read test expectations from status files. |
| testExpectations = |
| @@ -167,7 +169,7 @@ class StandardTestSuite implements TestSuite { |
| throw s; |
| }; |
| dir.fileHandler = processFile; |
| - dir.doneHandler = doDone; |
| + dir.doneHandler = directoryListingDone; |
| dir.list(recursive: listRecursively()); |
| } |
| @@ -222,15 +224,31 @@ class StandardTestSuite implements TestSuite { |
| if (optionsFromFile['isMultitest']) { |
| + ++activeMultitests; |
| DoMultitest(filename, |
| TestUtils.buildDir(configuration), |
| directoryPath, |
| - createTestCase); |
| + createTestCase, |
| + multitestDone); |
| } else { |
| createTestCase(filename, optionsFromFile['isNegative']); |
| } |
| } |
| + void multitestDone() { |
| + --activeMultitests; |
| + if (activeMultitests == 0 && listingDone) { |
| + doDone(); |
| + } |
| + } |
| + |
| + void directoryListingDone(ignore) { |
| + listingDone = true; |
| + if (activeMultitests == 0 && listingDone) { |
|
Mads Ager (google)
2011/12/01 11:50:47
You don't need to check for listingDone here.
|
| + doDone(); |
| + } |
| + } |
| + |
| void completeHandler(TestCase testCase) { |
| } |