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

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

Issue 9139017: Make test_wrapper.py and test_compiler.dart that will work for a deps.compiler checkout. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Change name to test-compiler.dart, add comments. Created 8 years, 11 months 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
« no previous file with comments | « no previous file | tools/test-runtime.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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
7 // to worry about the special runtime checkout anymore.
8
9 #library("test"); 6 #library("test");
10 7
11 #import("testing/dart/test_runner.dart"); 8 #import("testing/dart/test_runner.dart");
12 #import("testing/dart/test_options.dart"); 9 #import("testing/dart/test_options.dart");
13 10
11 // This file is identical to test.dart with suites in frog and utils removed.
14 #import("../tests/co19/test_config.dart"); 12 #import("../tests/co19/test_config.dart");
15 #import("../tests/corelib/test_config.dart"); 13 #import("../tests/corelib/test_config.dart");
16 #import("../tests/isolate/test_config.dart"); 14 #import("../tests/isolate/test_config.dart");
17 #import("../tests/language/test_config.dart"); 15 #import("../tests/language/test_config.dart");
18 #import("../tests/standalone/test_config.dart"); 16 #import("../tests/standalone/test_config.dart");
19 #import("../tests/stub-generator/test_config.dart"); 17 #import("../tests/stub-generator/test_config.dart");
20 #import("../runtime/tests/vm/test_config.dart"); 18 #import("../runtime/tests/vm/test_config.dart");
19 #import("../samples/tests/samples/test_config.dart");
20 #import("../client/tests/dartc/test_config.dart");
21 #import("../compiler/tests/dartc/test_config.dart");
22 #import("../client/tests/client/test_config.dart");
21 23
22 main() { 24 main() {
23 var startTime = new Date.now(); 25 var startTime = new Date.now();
24 var optionsParser = new TestOptionsParser(); 26 var optionsParser = new TestOptionsParser();
25 List<Map> configurations = optionsParser.parse(new Options().arguments); 27 List<Map> configurations = optionsParser.parse(new Options().arguments);
26 if (configurations == null) return; 28 if (configurations == null) return;
27 29
28 // Extract global options from first configuration. 30 // Extract global options from first configuration.
29 var firstConf = configurations[0]; 31 var firstConf = configurations[0];
30 Map<String, RegExp> selectors = firstConf['selectors']; 32 Map<String, RegExp> selectors = firstConf['selectors'];
31 var maxProcesses = firstConf['tasks']; 33 var maxProcesses = firstConf['tasks'];
32 var progressIndicator = firstConf['progress']; 34 var progressIndicator = firstConf['progress'];
33 var verbose = firstConf['verbose']; 35 var verbose = firstConf['verbose'];
34 var printTiming = firstConf['time']; 36 var printTiming = firstConf['time'];
35 var listTests = firstConf['list']; 37 var listTests = firstConf['list'];
36 38
37 var configurationIterator = configurations.iterator(); 39 var configurationIterator = configurations.iterator();
38 bool enqueueConfiguration(ProcessQueue queue) { 40 bool enqueueConfiguration(ProcessQueue queue) {
39 if (!configurationIterator.hasNext()) { 41 if (!configurationIterator.hasNext()) {
40 return false; 42 return false;
41 } 43 }
42 44
43 var conf = configurationIterator.next(); 45 var conf = configurationIterator.next();
46 if (selectors.containsKey('samples')) {
47 queue.addTestSuite(new SamplesTestSuite(conf));
48 }
44 if (selectors.containsKey('standalone')) { 49 if (selectors.containsKey('standalone')) {
45 queue.addTestSuite(new StandaloneTestSuite(conf)); 50 queue.addTestSuite(new StandaloneTestSuite(conf));
46 } 51 }
47 if (selectors.containsKey('corelib')) { 52 if (selectors.containsKey('corelib')) {
48 queue.addTestSuite(new CorelibTestSuite(conf)); 53 queue.addTestSuite(new CorelibTestSuite(conf));
49 } 54 }
50 if (selectors.containsKey('co19')) { 55 if (selectors.containsKey('co19')) {
51 queue.addTestSuite(new Co19TestSuite(conf)); 56 queue.addTestSuite(new Co19TestSuite(conf));
52 } 57 }
53 if (selectors.containsKey('language')) { 58 if (selectors.containsKey('language')) {
54 queue.addTestSuite(new LanguageTestSuite(conf)); 59 queue.addTestSuite(new LanguageTestSuite(conf));
55 } 60 }
56 if (selectors.containsKey('isolate')) { 61 if (selectors.containsKey('isolate')) {
57 queue.addTestSuite(new IsolateTestSuite(conf)); 62 queue.addTestSuite(new IsolateTestSuite(conf));
58 } 63 }
59 if (selectors.containsKey('stub-generator')) { 64 if (selectors.containsKey('stub-generator')) {
60 queue.addTestSuite(new StubGeneratorTestSuite(conf)); 65 queue.addTestSuite(new StubGeneratorTestSuite(conf));
61 } 66 }
62 if (conf['component'] == 'vm' && selectors.containsKey('vm')) { 67 if (conf['component'] == 'dartc' && selectors.containsKey('dartc')) {
63 queue.addTestSuite(new VMTestSuite(conf)); 68 queue.addTestSuite(new ClientDartcTestSuite(conf));
69 }
70 if (conf['component'] == 'dartc' && selectors.containsKey('dartc')) {
71 queue.addTestSuite(new JUnitDartcTestSuite(conf));
72 }
73 if (selectors.containsKey('client')) {
74 queue.addTestSuite(new ClientTestSuite(conf));
64 } 75 }
65 76
66 return true; 77 return true;
67 } 78 }
68 79
69 // Start process queue. 80 // Start process queue.
70 var queue = new ProcessQueue(maxProcesses, 81 var queue = new ProcessQueue(maxProcesses,
71 progressIndicator, 82 progressIndicator,
72 startTime, 83 startTime,
73 printTiming, 84 printTiming,
74 enqueueConfiguration, 85 enqueueConfiguration,
75 verbose: verbose, 86 verbose: verbose,
76 listTests: listTests); 87 listTests: listTests);
77 } 88 }
OLDNEW
« no previous file with comments | « no previous file | tools/test-runtime.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698