| 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 27 matching lines...) Expand all Loading... |
| 38 #import("../runtime/tests/vm/test_config.dart"); | 38 #import("../runtime/tests/vm/test_config.dart"); |
| 39 #import("../samples/tests/samples/test_config.dart"); | 39 #import("../samples/tests/samples/test_config.dart"); |
| 40 #import("../client/tests/dartc/test_config.dart"); | 40 #import("../client/tests/dartc/test_config.dart"); |
| 41 #import("../compiler/tests/dartc/test_config.dart"); | 41 #import("../compiler/tests/dartc/test_config.dart"); |
| 42 #import("../client/tests/client/test_config.dart"); | 42 #import("../client/tests/client/test_config.dart"); |
| 43 #import("../frog/tests/frog/test_config.dart"); | 43 #import("../frog/tests/frog/test_config.dart"); |
| 44 #import("../frog/tests/leg/test_config.dart"); | 44 #import("../frog/tests/leg/test_config.dart"); |
| 45 #import("../frog/tests/leg_only/test_config.dart"); | 45 #import("../frog/tests/leg_only/test_config.dart"); |
| 46 #import("../frog/tests/native/test_config.dart"); | 46 #import("../frog/tests/native/test_config.dart"); |
| 47 #import("../frog/tests/await/test_config.dart"); | 47 #import("../frog/tests/await/test_config.dart"); |
| 48 #import("../utils/tests/css/test_config.dart"); |
| 49 #import("../utils/tests/import_mapper/test_config.dart"); |
| 50 #import("../utils/tests/peg/test_config.dart"); |
| 48 | 51 |
| 49 /** | 52 /** |
| 50 * The directories that contain test suites which follow the conventions | 53 * The directories that contain test suites which follow the conventions |
| 51 * required by [DirectoryTestSuite]. Ideally, we'd move more suites to this | 54 * required by [DirectoryTestSuite]. Ideally, we'd move more suites to this |
| 52 * convention because it makes it much simpler to add them to test.dart. (You | 55 * convention because it makes it much simpler to add them to test.dart. (You |
| 53 * basically add the directory here and you're done.) | 56 * basically add the directory here and you're done.) |
| 54 */ | 57 */ |
| 55 final TEST_SUITE_DIRECTORIES = const [ | 58 final TEST_SUITE_DIRECTORIES = const [ |
| 56 'utils/tests/css', | |
| 57 'utils/tests/import_mapper', | |
| 58 'utils/tests/peg', | |
| 59 'utils/tests/pub' | 59 'utils/tests/pub' |
| 60 ]; | 60 ]; |
| 61 | 61 |
| 62 main() { | 62 main() { |
| 63 var startTime = new Date.now(); | 63 var startTime = new Date.now(); |
| 64 var optionsParser = new TestOptionsParser(); | 64 var optionsParser = new TestOptionsParser(); |
| 65 List<Map> configurations = optionsParser.parse(new Options().arguments); | 65 List<Map> configurations = optionsParser.parse(new Options().arguments); |
| 66 if (configurations == null || configurations.length == 0) return; | 66 if (configurations == null || configurations.length == 0) return; |
| 67 | 67 |
| 68 // Extract global options from first configuration. | 68 // Extract global options from first configuration. |
| (...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 132 } | 132 } |
| 133 if (selectors.containsKey('frog_native')) { | 133 if (selectors.containsKey('frog_native')) { |
| 134 queue.addTestSuite(new FrogNativeTestSuite(conf)); | 134 queue.addTestSuite(new FrogNativeTestSuite(conf)); |
| 135 } | 135 } |
| 136 if (conf['compiler'] == 'dartc' && selectors.containsKey('dartc')) { | 136 if (conf['compiler'] == 'dartc' && selectors.containsKey('dartc')) { |
| 137 queue.addTestSuite(new ClientDartcTestSuite(conf)); | 137 queue.addTestSuite(new ClientDartcTestSuite(conf)); |
| 138 } | 138 } |
| 139 if (conf['compiler'] == 'dartc' && selectors.containsKey('dartc')) { | 139 if (conf['compiler'] == 'dartc' && selectors.containsKey('dartc')) { |
| 140 queue.addTestSuite(new JUnitDartcTestSuite(conf)); | 140 queue.addTestSuite(new JUnitDartcTestSuite(conf)); |
| 141 } | 141 } |
| 142 if (selectors.containsKey('css')) { |
| 143 queue.addTestSuite(new CssTestSuite(conf)); |
| 144 } |
| 145 if (selectors.containsKey('import_mapper')) { |
| 146 queue.addTestSuite(new ImportMapperTestSuite(conf)); |
| 147 } |
| 148 if (selectors.containsKey('peg')) { |
| 149 queue.addTestSuite(new PegTestSuite(conf)); |
| 150 } |
| 142 if (selectors.containsKey('await')) { | 151 if (selectors.containsKey('await')) { |
| 143 queue.addTestSuite(new AwaitTestSuite(conf)); | 152 queue.addTestSuite(new AwaitTestSuite(conf)); |
| 144 } | 153 } |
| 145 if (selectors.containsKey('client')) { | 154 if (selectors.containsKey('client')) { |
| 146 queue.addTestSuite(new ClientTestSuite(conf)); | 155 queue.addTestSuite(new ClientTestSuite(conf)); |
| 147 } | 156 } |
| 148 | 157 |
| 149 for (final testSuiteDir in TEST_SUITE_DIRECTORIES) { | 158 for (final testSuiteDir in TEST_SUITE_DIRECTORIES) { |
| 150 final name = testSuiteDir.substring(testSuiteDir.lastIndexOf('/') + 1); | 159 final name = testSuiteDir.substring(testSuiteDir.lastIndexOf('/') + 1); |
| 151 if (selectors.containsKey(name)) { | 160 if (selectors.containsKey(name)) { |
| 152 queue.addTestSuite( | 161 queue.addTestSuite( |
| 153 new StandardTestSuite.forDirectory(conf, testSuiteDir)); | 162 new StandardTestSuite.forDirectory(conf, testSuiteDir)); |
| 154 } | 163 } |
| 155 } | 164 } |
| 156 | 165 |
| 157 return true; | 166 return true; |
| 158 } | 167 } |
| 159 | 168 |
| 160 // Start process queue. | 169 // Start process queue. |
| 161 var queue = new ProcessQueue(maxProcesses, | 170 var queue = new ProcessQueue(maxProcesses, |
| 162 progressIndicator, | 171 progressIndicator, |
| 163 startTime, | 172 startTime, |
| 164 printTiming, | 173 printTiming, |
| 165 enqueueConfiguration, | 174 enqueueConfiguration, |
| 166 verbose, | 175 verbose, |
| 167 listTests, | 176 listTests, |
| 168 keepGeneratedTests); | 177 keepGeneratedTests); |
| 169 } | 178 } |
| OLD | NEW |