OLD | NEW |
1 #!/usr/bin/env dart | 1 #!/usr/bin/env dart |
2 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 2 // Copyright (c) 2012, 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 /** | 6 /** |
7 * This file is the entrypoint of the dart test suite. This suite is used | 7 * This file is the entrypoint of the dart test suite. This suite is used |
8 * to test: | 8 * to test: |
9 * | 9 * |
10 * 1. the dart vm | 10 * 1. the dart vm |
(...skipping 11 matching lines...) Expand all Loading... |
22 * "tools/testing/test_options.dart". | 22 * "tools/testing/test_options.dart". |
23 * | 23 * |
24 */ | 24 */ |
25 | 25 |
26 #library("test"); | 26 #library("test"); |
27 | 27 |
28 #import("testing/dart/test_runner.dart"); | 28 #import("testing/dart/test_runner.dart"); |
29 #import("testing/dart/test_options.dart"); | 29 #import("testing/dart/test_options.dart"); |
30 #import("testing/dart/test_suite.dart"); | 30 #import("testing/dart/test_suite.dart"); |
31 | 31 |
| 32 #import("../client/tests/dartc/test_config.dart"); |
| 33 #import("../compiler/tests/dartc/test_config.dart"); |
| 34 #import("../frog/tests/await/test_config.dart"); |
| 35 #import("../frog/tests/frog/test_config.dart"); |
| 36 #import("../frog/tests/leg/test_config.dart"); |
| 37 #import("../frog/tests/leg_only/test_config.dart"); |
| 38 #import("../frog/tests/native/test_config.dart"); |
| 39 #import("../runtime/tests/vm/test_config.dart"); |
| 40 #import("../samples/tests/samples/test_config.dart"); |
32 #import("../tests/co19/test_config.dart"); | 41 #import("../tests/co19/test_config.dart"); |
33 #import("../tests/corelib/test_config.dart"); | 42 #import("../tests/corelib/test_config.dart"); |
34 #import("../tests/isolate/test_config.dart"); | 43 #import("../tests/isolate/test_config.dart"); |
35 #import("../tests/language/test_config.dart"); | 44 #import("../tests/language/test_config.dart"); |
36 #import("../tests/lib/test_config.dart"); | 45 #import("../tests/lib/test_config.dart"); |
37 #import("../tests/standalone/test_config.dart"); | 46 #import("../tests/standalone/test_config.dart"); |
38 #import("../tests/utils/test_config.dart"); | 47 #import("../tests/utils/test_config.dart"); |
39 #import("../runtime/tests/vm/test_config.dart"); | |
40 #import("../samples/tests/samples/test_config.dart"); | |
41 #import("../client/tests/dartc/test_config.dart"); | |
42 #import("../compiler/tests/dartc/test_config.dart"); | |
43 #import("../client/tests/client/test_config.dart"); | |
44 #import("../frog/tests/frog/test_config.dart"); | |
45 #import("../frog/tests/leg/test_config.dart"); | |
46 #import("../frog/tests/leg_only/test_config.dart"); | |
47 #import("../frog/tests/native/test_config.dart"); | |
48 #import("../frog/tests/await/test_config.dart"); | |
49 | 48 |
50 /** | 49 /** |
51 * The directories that contain test suites which follow the conventions | 50 * The directories that contain test suites which follow the conventions |
52 * required by [StandardTestSuite]'s forDirectory constructor. | 51 * required by [StandardTestSuite]'s forDirectory constructor. |
53 * New test suites should follow this convention because it makes it much | 52 * New test suites should follow this convention because it makes it much |
54 * simpler to add them to test.dart. Existing test suites should be | 53 * simpler to add them to test.dart. Existing test suites should be |
55 * moved to here, if possible. | 54 * moved to here, if possible. |
56 */ | 55 */ |
57 final TEST_SUITE_DIRECTORIES = const [ | 56 final TEST_SUITE_DIRECTORIES = const [ |
| 57 'tests/benchmark_smoke', |
| 58 'tests/dom', |
| 59 'tests/html', |
| 60 'tests/json', |
58 'utils/tests/css', | 61 'utils/tests/css', |
59 'utils/tests/peg', | 62 'utils/tests/peg', |
60 'utils/tests/pub', | 63 'utils/tests/pub', |
61 ]; | 64 ]; |
62 | 65 |
63 main() { | 66 main() { |
64 var startTime = new Date.now(); | 67 var startTime = new Date.now(); |
65 var optionsParser = new TestOptionsParser(); | 68 var optionsParser = new TestOptionsParser(); |
66 List<Map> configurations = optionsParser.parse(new Options().arguments); | 69 List<Map> configurations = optionsParser.parse(new Options().arguments); |
67 if (configurations == null || configurations.length == 0) return; | 70 if (configurations == null || configurations.length == 0) return; |
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
139 } | 142 } |
140 if (conf['compiler'] == 'dartc' && selectors.containsKey('dartc')) { | 143 if (conf['compiler'] == 'dartc' && selectors.containsKey('dartc')) { |
141 queue.addTestSuite(new ClientDartcTestSuite(conf)); | 144 queue.addTestSuite(new ClientDartcTestSuite(conf)); |
142 } | 145 } |
143 if (conf['compiler'] == 'dartc' && selectors.containsKey('dartc')) { | 146 if (conf['compiler'] == 'dartc' && selectors.containsKey('dartc')) { |
144 queue.addTestSuite(new JUnitDartcTestSuite(conf)); | 147 queue.addTestSuite(new JUnitDartcTestSuite(conf)); |
145 } | 148 } |
146 if (selectors.containsKey('await')) { | 149 if (selectors.containsKey('await')) { |
147 queue.addTestSuite(new AwaitTestSuite(conf)); | 150 queue.addTestSuite(new AwaitTestSuite(conf)); |
148 } | 151 } |
149 if (selectors.containsKey('client')) { | |
150 queue.addTestSuite(new ClientTestSuite(conf)); | |
151 } | |
152 | 152 |
153 for (final testSuiteDir in TEST_SUITE_DIRECTORIES) { | 153 for (final testSuiteDir in TEST_SUITE_DIRECTORIES) { |
154 final name = testSuiteDir.substring(testSuiteDir.lastIndexOf('/') + 1); | 154 final name = testSuiteDir.substring(testSuiteDir.lastIndexOf('/') + 1); |
155 if (selectors.containsKey(name)) { | 155 if (selectors.containsKey(name)) { |
156 queue.addTestSuite( | 156 queue.addTestSuite( |
157 new StandardTestSuite.forDirectory(conf, testSuiteDir)); | 157 new StandardTestSuite.forDirectory(conf, testSuiteDir)); |
158 } | 158 } |
159 } | 159 } |
160 | 160 |
161 return true; | 161 return true; |
162 } | 162 } |
163 | 163 |
164 // Start process queue. | 164 // Start process queue. |
165 var queue = new ProcessQueue(maxProcesses, | 165 var queue = new ProcessQueue(maxProcesses, |
166 progressIndicator, | 166 progressIndicator, |
167 startTime, | 167 startTime, |
168 printTiming, | 168 printTiming, |
169 enqueueConfiguration, | 169 enqueueConfiguration, |
170 verbose, | 170 verbose, |
171 listTests, | 171 listTests, |
172 keepGeneratedTests); | 172 keepGeneratedTests); |
173 } | 173 } |
OLD | NEW |