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

Side by Side Diff: tools/test-runtime.dart

Issue 8773036: Make multi tests work with DartC. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Reworking Created 9 years 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 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 // TODO(ager): Get rid of this version of test.dart when we don't have 6 // TODO(ager): Get rid of this version of test.dart when we don't have
7 // to worry about the special runtime checkout anymore. 7 // to worry about the special runtime checkout anymore.
8 8
9 #library("test"); 9 #library("test");
10 10
11 #import("testing/dart/test_runner.dart"); 11 #import("testing/dart/test_runner.dart");
12 #import("testing/dart/test_options.dart"); 12 #import("testing/dart/test_options.dart");
13 13
14 #import("../tests/co19/test_config.dart"); 14 #import("../tests/co19/test_config.dart");
15 #import("../tests/corelib/test_config.dart"); 15 #import("../tests/corelib/test_config.dart");
16 #import("../tests/isolate/test_config.dart"); 16 #import("../tests/isolate/test_config.dart");
17 #import("../tests/language/test_config.dart"); 17 #import("../tests/language/test_config.dart");
18 #import("../tests/standalone/test_config.dart"); 18 #import("../tests/standalone/test_config.dart");
19 #import("../tests/stub-generator/test_config.dart"); 19 #import("../tests/stub-generator/test_config.dart");
20 #import("../runtime/tests/vm/test_config.dart"); 20 #import("../runtime/tests/vm/test_config.dart");
21 21
22 main() { 22 main() {
23 var startTime = new Date.now(); 23 var startTime = new Date.now();
24 var optionsParser = new TestOptionsParser(); 24 var optionsParser = new TestOptionsParser();
25 var configurations = optionsParser.parse(new Options().arguments); 25 List<Map> configurations = optionsParser.parse(new Options().arguments);
26 if (configurations == null) return; 26 if (configurations == null) return;
27
27 // Extract global options from first configuration. 28 // Extract global options from first configuration.
28 var firstConf = configurations[0]; 29 var firstConf = configurations[0];
29 var queue = new ProcessQueue(firstConf['tasks'],
30 firstConf['progress'],
31 startTime);
32 Map<String, RegExp> selectors = firstConf['selectors']; 30 Map<String, RegExp> selectors = firstConf['selectors'];
33 for (var conf in configurations) { 31 var maxProcesses = firstConf['tasks'];
32 var progressIndicator = firstConf['progress'];
33
34 var currentConfiguration = 0;
Bill Hesse 2011/12/02 13:10:06 When I did the equivalent thing for serializing mu
Mads Ager (google) 2011/12/02 13:32:49 Done.
35 bool enqueueConfiguration(ProcessQueue queue) {
36 if (currentConfiguration == configurations.length) {
37 return false;
38 }
39
40 var conf = configurations[currentConfiguration++];
34 if (selectors.containsKey('standalone')) { 41 if (selectors.containsKey('standalone')) {
35 queue.addTestSuite(new StandaloneTestSuite(conf)); 42 queue.addTestSuite(new StandaloneTestSuite(conf));
36 } 43 }
37 if (selectors.containsKey('corelib')) { 44 if (selectors.containsKey('corelib')) {
38 queue.addTestSuite(new CorelibTestSuite(conf)); 45 queue.addTestSuite(new CorelibTestSuite(conf));
39 } 46 }
40 if (selectors.containsKey('co19')) { 47 if (selectors.containsKey('co19')) {
41 queue.addTestSuite(new Co19TestSuite(conf)); 48 queue.addTestSuite(new Co19TestSuite(conf));
42 } 49 }
43 if (selectors.containsKey('language')) { 50 if (selectors.containsKey('language')) {
44 queue.addTestSuite(new LanguageTestSuite(conf)); 51 queue.addTestSuite(new LanguageTestSuite(conf));
45 } 52 }
46 if (selectors.containsKey('isolate')) { 53 if (selectors.containsKey('isolate')) {
47 queue.addTestSuite(new IsolateTestSuite(conf)); 54 queue.addTestSuite(new IsolateTestSuite(conf));
48 } 55 }
49 if (selectors.containsKey('stub-generator')) { 56 if (selectors.containsKey('stub-generator')) {
50 queue.addTestSuite(new StubGeneratorTestSuite(conf)); 57 queue.addTestSuite(new StubGeneratorTestSuite(conf));
51 } 58 }
52 if (conf['component'] == 'vm' && selectors.containsKey('vm')) { 59 if (conf['component'] == 'vm' && selectors.containsKey('vm')) {
53 queue.addTestSuite(new VMTestSuite(conf)); 60 queue.addTestSuite(new VMTestSuite(conf));
54 } 61 }
62
63 return true;
55 } 64 }
65
66 // Start process queue.
67 var queue = new ProcessQueue(firstConf['tasks'],
68 firstConf['progress'],
69 startTime,
70 enqueueConfiguration);
56 } 71 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698