Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 #!/usr/bin/env dart | 1 #!/usr/bin/env dart |
| 2 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file | 2 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file |
| 3 // for details. All rights reserved. Use of this source code is governed by a | 3 // for details. All rights reserved. Use of this source code is governed by a |
| 4 // BSD-style license that can be found in the LICENSE file. | 4 // BSD-style license that can be found in the LICENSE file. |
| 5 | 5 |
| 6 #library("test"); | 6 #library("test"); |
| 7 | 7 |
| 8 #import("testing/dart/test_runner.dart"); | 8 #import("testing/dart/test_runner.dart"); |
| 9 #import("testing/dart/test_options.dart"); | 9 #import("testing/dart/test_options.dart"); |
| 10 | 10 |
| 11 #import("../tests/co19/test_config.dart"); | 11 #import("../tests/co19/test_config.dart"); |
| 12 #import("../tests/corelib/test_config.dart"); | 12 #import("../tests/corelib/test_config.dart"); |
| 13 #import("../tests/isolate/test_config.dart"); | 13 #import("../tests/isolate/test_config.dart"); |
| 14 #import("../tests/language/test_config.dart"); | 14 #import("../tests/language/test_config.dart"); |
| 15 #import("../tests/standalone/test_config.dart"); | 15 #import("../tests/standalone/test_config.dart"); |
| 16 #import("../tests/stub-generator/test_config.dart"); | 16 #import("../tests/stub-generator/test_config.dart"); |
| 17 #import("../runtime/tests/vm/test_config.dart"); | 17 #import("../runtime/tests/vm/test_config.dart"); |
| 18 #import("../samples/tests/samples/test_config.dart"); | 18 #import("../samples/tests/samples/test_config.dart"); |
| 19 | 19 |
| 20 // TODO(ager): This activity tracking is temporary until stdout is | 20 // TODO(ager): This activity tracking is temporary until stdout is |
| 21 // closed implicitly when nothing more can happen. | 21 // closed implicitly when nothing more can happen. |
| 22 int pendingActivities = 0; | 22 int pendingActivities = 0; |
| 23 | 23 |
| 24 void activityStarted() { | 24 void activityStarted() { |
| 25 ++pendingActivities; | 25 ++pendingActivities; |
| 26 } | 26 } |
| 27 | 27 |
| 28 void activityCompleted() { | 28 void activityCompleted() { |
| 29 --pendingActivities; | 29 --pendingActivities; |
| 30 print(pendingActivities); | |
|
Søren Gjesse
2011/11/23 09:57:46
Accidental edit.
| |
| 30 } | 31 } |
| 31 | 32 |
| 32 void exitIfLastActivity() { | 33 void exitIfLastActivity() { |
| 33 if (pendingActivities == 1) { | 34 if (pendingActivities == 1) { |
| 34 stdout.write('\n'.charCodes()); | 35 stdout.write('\n'.charCodes()); |
| 35 stdout.close(); | 36 stdout.close(); |
| 36 } | 37 } |
| 37 } | 38 } |
| 38 | 39 |
| 39 main() { | 40 main() { |
| (...skipping 22 matching lines...) Expand all Loading... | |
| 62 activityStarted(); | 63 activityStarted(); |
| 63 new IsolateTestSuite(conf).forEachTest(queue.runTest, activityCompleted); | 64 new IsolateTestSuite(conf).forEachTest(queue.runTest, activityCompleted); |
| 64 activityStarted(); | 65 activityStarted(); |
| 65 new StubGeneratorTestSuite(conf).forEachTest(queue.runTest, activityComplete d); | 66 new StubGeneratorTestSuite(conf).forEachTest(queue.runTest, activityComplete d); |
| 66 if (conf["component"] == "vm") { | 67 if (conf["component"] == "vm") { |
| 67 activityStarted(); | 68 activityStarted(); |
| 68 new VMTestSuite(conf).forEachTest(queue.runTest, activityCompleted); | 69 new VMTestSuite(conf).forEachTest(queue.runTest, activityCompleted); |
| 69 } | 70 } |
| 70 } | 71 } |
| 71 } | 72 } |
| OLD | NEW |