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

Unified Diff: tools/test.dart

Issue 8537010: Enable frong testing components. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 9 years, 1 month 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/test.dart
diff --git a/tools/test.dart b/tools/test.dart
index 9274d73acb030d8202191418c147ae27fa23226f..1219d531dd2f68123c162ba7b186934ed0013737 100755
--- a/tools/test.dart
+++ b/tools/test.dart
@@ -7,20 +7,38 @@
#import("testing/dart/test_runner.dart");
#import("testing/dart/test_options.dart");
-#import("testing/dart/test_progress.dart");
#import("../tests/standalone/test_config.dart");
#import("../tests/corelib/test_config.dart");
+
+// TODO(ager): This activity tracking is temporary until stdout is
+// closed implicitly when nothing more can happen.
+int pendingActivities = 0;
+
+void onExit() {
+ stdout.write('\n'.charCodes());
+ stdout.close();
+}
+
+void activityStarted() {
+ pendingActivities++;
+}
+
+void activityCompleted() {
+ if (--pendingActivities == 0) onExit();
+}
+
main() {
var optionsParser = new TestOptionsParser();
var configurations = optionsParser.parse(new Options().arguments);
if (configurations == null) return;
- print(configurations.length);
- var queue = new ProcessQueue(configurations[0]['tasks'],
- new CompactProgressIndicator());
+ activityStarted();
+ var queue = new ProcessQueue(configurations[0], activityCompleted);
for (var conf in configurations) {
- new StandaloneTestSuite(conf).forEachTest(queue.runTest);
- new CorelibTestSuite(conf).forEachTest(queue.runTest);
+ activityStarted();
+ new StandaloneTestSuite(conf).forEachTest(queue.runTest, activityCompleted);
+ activityStarted();
+ new CorelibTestSuite(conf).forEachTest(queue.runTest, activityCompleted);
}
}

Powered by Google App Engine
This is Rietveld 408576698