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

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: Updated the Dart test runner to work with the file input stream changes 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
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() {
« tools/testing/dart/status_file_parser.dart ('K') | « 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