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

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

Issue 113943007: Added convenience function for reading status file expectations (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 12 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 | dart/tools/testing/dart/test_suite.dart » ('j') | dart/tools/testing/dart/test_suite.dart » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: dart/tools/testing/dart/status_file_parser.dart
diff --git a/dart/tools/testing/dart/status_file_parser.dart b/dart/tools/testing/dart/status_file_parser.dart
index 692268796e0018ad9c130630cc8bd9e3acec00cc..48397572fa2573167245d8371486aa9393d40702 100644
--- a/dart/tools/testing/dart/status_file_parser.dart
+++ b/dart/tools/testing/dart/status_file_parser.dart
@@ -124,10 +124,19 @@ class Section {
}
}
-void ReadTestExpectationsInto(TestExpectations expectations,
- String statusFilePath,
- environment,
- onDone) {
+Future<TestExpectations> ReadTestExpectations(List<String> statusFilePaths,
+ Map environment) {
+ var testExpectations = new TestExpectations();
+ return Future.wait(statusFilePaths.map((String statusFile) {
+ return ReadTestExpectationsInto(
+ testExpectations, statusFile, environment);
+ })).then((_) => testExpectations);
+}
+
+Future ReadTestExpectationsInto(TestExpectations expectations,
+ String statusFilePath,
+ environment) {
+ var completer = new Completer();
List<Section> sections = new List<Section>();
void sectionsRead() {
@@ -138,10 +147,11 @@ void ReadTestExpectationsInto(TestExpectations expectations,
}
}
}
- onDone();
+ completer.complete();
}
ReadConfigurationInto(statusFilePath, sections, sectionsRead);
+ return completer.future;
}
void ReadConfigurationInto(path, sections, onDone) {
ricow1 2014/01/06 13:25:19 while you are at it, you might as well have this a
kustermann 2014/01/06 13:56:32 I rather not do it in this CL. Otherwise I'll have
« no previous file with comments | « no previous file | dart/tools/testing/dart/test_suite.dart » ('j') | dart/tools/testing/dart/test_suite.dart » ('J')

Powered by Google App Engine
This is Rietveld 408576698