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

Side by Side 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 #!/usr/bin/env dart_bin 1 #!/usr/bin/env dart_bin
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 #import("testing/dart/test_progress.dart");
11 10
12 #import("../tests/standalone/test_config.dart"); 11 #import("../tests/standalone/test_config.dart");
13 #import("../tests/corelib/test_config.dart"); 12 #import("../tests/corelib/test_config.dart");
14 13
14
15 // TODO(ager): This activity tracking is temporary until stdout is
16 // closed implicitly when nothing more can happen.
17 int pendingActivities = 0;
18
19 void onExit() {
20 stdout.write('\n'.charCodes());
21 stdout.close();
22 }
23
24 void activityStarted() {
25 pendingActivities++;
26 }
27
28 void activityCompleted() {
29 if (--pendingActivities == 0) onExit();
30 }
31
15 main() { 32 main() {
16 var optionsParser = new TestOptionsParser(); 33 var optionsParser = new TestOptionsParser();
17 var configurations = optionsParser.parse(new Options().arguments); 34 var configurations = optionsParser.parse(new Options().arguments);
18 if (configurations == null) return; 35 if (configurations == null) return;
19 print(configurations.length); 36 activityStarted();
20 var queue = new ProcessQueue(configurations[0]['tasks'], 37 var queue = new ProcessQueue(configurations[0], activityCompleted);
21 new CompactProgressIndicator());
22 for (var conf in configurations) { 38 for (var conf in configurations) {
23 new StandaloneTestSuite(conf).forEachTest(queue.runTest); 39 activityStarted();
24 new CorelibTestSuite(conf).forEachTest(queue.runTest); 40 new StandaloneTestSuite(conf).forEachTest(queue.runTest, activityCompleted);
41 activityStarted();
42 new CorelibTestSuite(conf).forEachTest(queue.runTest, activityCompleted);
25 } 43 }
26 } 44 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698