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 e31be54dd9e2f6a81e5e88faba9e3da542447ca0..cdf7e05201c6e11fa794424240b1bcf042a6f102 100644 |
| --- a/tools/testing/dart/test_suite.dart |
| +++ b/tools/testing/dart/test_suite.dart |
| @@ -103,19 +103,26 @@ class CCTestSuite implements TestSuite { |
| doTest = onTest; |
| doDone = (ignore) => (onDone != null) ? onDone() : null; |
| + var filesRead = 0; |
| + void statusFileRead() { |
| + filesRead++; |
| + if (filesRead == statusFilePaths.length) { |
| + receiveTestName = new ReceivePort(); |
| + new CCTestListerIsolate().spawn().then((port) { |
| + port.send(runnerPath, receiveTestName.toSendPort()); |
| + receiveTestName.receive(testNameHandler); |
| + }); |
| + } |
| + } |
| + |
| testExpectations = |
| new TestExpectations(complexMatching: complexStatusMatching()); |
| for (var statusFilePath in statusFilePaths) { |
| ReadTestExpectationsInto(testExpectations, |
| statusFilePath, |
| - configuration); |
| + configuration, |
| + statusFileRead); |
| } |
| - |
| - receiveTestName = new ReceivePort(); |
| - new CCTestListerIsolate().spawn().then((port) { |
| - port.send(runnerPath, receiveTestName.toSendPort()); |
| - receiveTestName.receive(testNameHandler); |
| - }); |
| } |
| void completeHandler(TestCase testCase) { |
| @@ -153,16 +160,24 @@ class StandardTestSuite implements TestSuite { |
| doTest = onTest; |
| doDone = (onDone != null) ? onDone : (() => null); |
| + var filesRead = 0; |
| + void statusFileRead() { |
| + filesRead++; |
| + if (filesRead == statusFilePaths.length) { |
| + processDirectory(); |
| + } |
| + } |
| + |
| // Read test expectations from status files. |
| testExpectations = |
| new TestExpectations(complexMatching: complexStatusMatching()); |
| + List<Future> fut = new List(); |
|
Mads Ager (google)
2011/12/09 13:09:33
fut fut, delete?
Søren Gjesse
2011/12/09 13:36:43
Done.
|
| for (var statusFilePath in statusFilePaths) { |
| ReadTestExpectationsInto(testExpectations, |
| statusFilePath, |
| - configuration); |
| + configuration, |
| + statusFileRead); |
| } |
| - |
| - processDirectory(); |
| } |
| void processDirectory() { |