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

Unified Diff: tools/test.dart

Issue 8682005: Perform better activity tracking in test scripts. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Hide more implementation details of ProcessQueue 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
« no previous file with comments | « no previous file | tools/testing/dart/test_progress.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/test.dart
diff --git a/tools/test.dart b/tools/test.dart
index 89014cf25f2bc7bc114bd2ad80af8dc3c53c2b7f..8dd7354f95b80bd2b160d62c8132b947f4fcd30c 100755
--- a/tools/test.dart
+++ b/tools/test.dart
@@ -17,55 +17,26 @@
#import("../runtime/tests/vm/test_config.dart");
#import("../samples/tests/samples/test_config.dart");
-// TODO(ager): This activity tracking is temporary until stdout is
-// closed implicitly when nothing more can happen.
-int pendingActivities = 0;
-
-void activityStarted() {
- ++pendingActivities;
-}
-
-void activityCompleted() {
- --pendingActivities;
-}
-
-void exitIfLastActivity() {
- if (pendingActivities == 1) {
- stdout.write('\n'.charCodes());
- stdout.close();
- }
-}
-
main() {
var startTime = new Date.now();
var optionsParser = new TestOptionsParser();
var configurations = optionsParser.parse(new Options().arguments);
if (configurations == null) return;
- activityStarted();
// Extract global options from first configuration.
var firstConf = configurations[0];
var queue = new ProcessQueue(firstConf['tasks'],
firstConf['progress'],
- startTime,
- exitIfLastActivity);
+ startTime);
for (var conf in configurations) {
- activityStarted();
- new SamplesTestSuite(conf).forEachTest(queue.runTest, activityCompleted);
- activityStarted();
- new StandaloneTestSuite(conf).forEachTest(queue.runTest, activityCompleted);
- activityStarted();
- new CorelibTestSuite(conf).forEachTest(queue.runTest, activityCompleted);
- activityStarted();
- new Co19TestSuite(conf).forEachTest(queue.runTest, activityCompleted);
- activityStarted();
- new LanguageTestSuite(conf).forEachTest(queue.runTest, activityCompleted);
- activityStarted();
- new IsolateTestSuite(conf).forEachTest(queue.runTest, activityCompleted);
- activityStarted();
- new StubGeneratorTestSuite(conf).forEachTest(queue.runTest, activityCompleted);
+ queue.addTestSuite(new SamplesTestSuite(conf));
+ queue.addTestSuite(new StandaloneTestSuite(conf));
+ queue.addTestSuite(new CorelibTestSuite(conf));
+ queue.addTestSuite(new Co19TestSuite(conf));
+ queue.addTestSuite(new LanguageTestSuite(conf));
+ queue.addTestSuite(new IsolateTestSuite(conf));
+ queue.addTestSuite(new StubGeneratorTestSuite(conf));
if (conf["component"] == "vm") {
- activityStarted();
- new VMTestSuite(conf).forEachTest(queue.runTest, activityCompleted);
+ queue.addTestSuite(new VMTestSuite(conf));
}
}
}
« no previous file with comments | « no previous file | tools/testing/dart/test_progress.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698