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)); |
} |
} |
} |