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

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

Issue 8885032: Improve the event handling for string input stream (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: rebased 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/status_file_parser.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 1bae83e2ab8fbed5f804839ec6942b1d91254afe..f25b699102e87b70662a8066681bc55ba84aef6f 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) {
@@ -166,30 +173,37 @@ class StandardTestSuite implements TestSuite {
doTest = onTest;
doDone = (onDone != null) ? onDone : (() => null);
+ var filesRead = 0;
+ void statusFileRead() {
+ filesRead++;
+ if (filesRead == statusFilePaths.length) {
+ // Checked if we have already found and generated the tests for
+ // this suite.
+ if (!testCache.containsKey(suiteName)) {
+ cachedTests = testCache[suiteName] = [];
+ processDirectory();
+ } else {
+ // We rely on enqueueing completing asynchronously so use a
+ // timer to make it so.
+ void enqueueCachedTests(Timer ignore) {
+ for (var info in testCache[suiteName]) {
+ enqueueTestCaseFromTestInformation(info);
+ }
+ doDone();
+ }
+ new Timer(enqueueCachedTests, 0, false);
+ }
+ }
+ }
+
// Read test expectations from status files.
testExpectations =
new TestExpectations(complexMatching: complexStatusMatching());
for (var statusFilePath in statusFilePaths) {
ReadTestExpectationsInto(testExpectations,
statusFilePath,
- configuration);
- }
-
- // Checked if we have already found and generated the tests for
- // this suite.
- if (!testCache.containsKey(suiteName)) {
- cachedTests = testCache[suiteName] = [];
- processDirectory();
- } else {
- // We rely on enqueueing completing asynchronously so use a
- // timer to make it so.
- void enqueueCachedTests(Timer ignore) {
- for (var info in testCache[suiteName]) {
- enqueueTestCaseFromTestInformation(info);
- }
- doDone();
- }
- new Timer(enqueueCachedTests, 0, false);
+ configuration,
+ statusFileRead);
}
}
« no previous file with comments | « tools/testing/dart/status_file_parser.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698