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 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
124 } else if (key == 'leg_only') { | 127 } else if (key == 'leg_only') { |
125 queue.addTestSuite(new LegOnlyTestSuite(conf)); | 128 queue.addTestSuite(new LegOnlyTestSuite(conf)); |
126 } else if (key == 'frog_native') { | 129 } else if (key == 'frog_native') { |
127 queue.addTestSuite(new FrogNativeTestSuite(conf)); | 130 queue.addTestSuite(new FrogNativeTestSuite(conf)); |
128 } else if (conf['compiler'] == 'dartc' && key == 'dartc') { | 131 } else if (conf['compiler'] == 'dartc' && key == 'dartc') { |
129 queue.addTestSuite(new ClientDartcTestSuite(conf)); | 132 queue.addTestSuite(new ClientDartcTestSuite(conf)); |
130 } else if (conf['compiler'] == 'dartc' && key == 'dartc') { | 133 } else if (conf['compiler'] == 'dartc' && key == 'dartc') { |
131 queue.addTestSuite(new JUnitDartcTestSuite(conf)); | 134 queue.addTestSuite(new JUnitDartcTestSuite(conf)); |
132 } else if (key == 'await') { | 135 } else if (key == 'await') { |
133 queue.addTestSuite(new AwaitTestSuite(conf)); | 136 queue.addTestSuite(new AwaitTestSuite(conf)); |
134 } else if (key == 'client') { | |
135 queue.addTestSuite(new ClientTestSuite(conf)); | |
136 } | 137 } |
137 } | 138 } |
138 | 139 |
139 for (final testSuiteDir in TEST_SUITE_DIRECTORIES) { | 140 for (final testSuiteDir in TEST_SUITE_DIRECTORIES) { |
140 final name = testSuiteDir.substring(testSuiteDir.lastIndexOf('/') + 1); | 141 final name = testSuiteDir.substring(testSuiteDir.lastIndexOf('/') + 1); |
141 if (selectors.containsKey(name)) { | 142 if (selectors.containsKey(name)) { |
142 queue.addTestSuite( | 143 queue.addTestSuite( |
143 new StandardTestSuite.forDirectory(conf, testSuiteDir)); | 144 new StandardTestSuite.forDirectory(conf, testSuiteDir)); |
144 } | 145 } |
145 } | 146 } |
146 | 147 |
147 return true; | 148 return true; |
148 } | 149 } |
149 | 150 |
150 // Start process queue. | 151 // Start process queue. |
151 var queue = new ProcessQueue(maxProcesses, | 152 var queue = new ProcessQueue(maxProcesses, |
152 progressIndicator, | 153 progressIndicator, |
153 startTime, | 154 startTime, |
154 printTiming, | 155 printTiming, |
155 enqueueConfiguration, | 156 enqueueConfiguration, |
156 verbose, | 157 verbose, |
157 listTests, | 158 listTests, |
158 keepGeneratedTests); | 159 keepGeneratedTests); |
159 } | 160 } |
OLD | NEW |