| OLD | NEW |
| 1 #!/usr/bin/env dart | 1 #!/usr/bin/env dart |
| 2 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file | 2 // Copyright (c) 2013, 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 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 64 new Path('tests/language'), | 64 new Path('tests/language'), |
| 65 new Path('tests/lib'), | 65 new Path('tests/lib'), |
| 66 new Path('tests/standalone'), | 66 new Path('tests/standalone'), |
| 67 new Path('tests/utils'), | 67 new Path('tests/utils'), |
| 68 new Path('utils/tests/css'), | 68 new Path('utils/tests/css'), |
| 69 new Path('utils/tests/peg'), | 69 new Path('utils/tests/peg'), |
| 70 new Path('utils/tests/pub'), | 70 new Path('utils/tests/pub'), |
| 71 new Path('sdk/lib/_internal/dartdoc'), | 71 new Path('sdk/lib/_internal/dartdoc'), |
| 72 ]; | 72 ]; |
| 73 | 73 |
| 74 main() { | 74 void testConfigurations(List<Map> configurations) { |
| 75 var startTime = new DateTime.now(); | 75 var startTime = new DateTime.now(); |
| 76 var optionsParser = new TestOptionsParser(); | |
| 77 List<Map> configurations = optionsParser.parse(new Options().arguments); | |
| 78 if (configurations == null || configurations.length == 0) return; | |
| 79 | |
| 80 // Extract global options from first configuration. | 76 // Extract global options from first configuration. |
| 81 var firstConf = configurations[0]; | 77 var firstConf = configurations[0]; |
| 82 Map<String, RegExp> selectors = firstConf['selectors']; | 78 Map<String, RegExp> selectors = firstConf['selectors']; |
| 83 var maxProcesses = firstConf['tasks']; | 79 var maxProcesses = firstConf['tasks']; |
| 84 var progressIndicator = firstConf['progress']; | 80 var progressIndicator = firstConf['progress']; |
| 85 BuildbotProgressIndicator.stepName = firstConf['step_name']; | 81 BuildbotProgressIndicator.stepName = firstConf['step_name']; |
| 86 var verbose = firstConf['verbose']; | 82 var verbose = firstConf['verbose']; |
| 87 var printTiming = firstConf['time']; | 83 var printTiming = firstConf['time']; |
| 88 var listTests = firstConf['list']; | 84 var listTests = firstConf['list']; |
| 89 var useContentSecurityPolicy = firstConf['csp']; | 85 var useContentSecurityPolicy = firstConf['csp']; |
| (...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 220 listTests); | 216 listTests); |
| 221 } | 217 } |
| 222 | 218 |
| 223 // Start all the HTTP servers required before starting the process queue. | 219 // Start all the HTTP servers required before starting the process queue. |
| 224 if (serverFutures.isEmpty) { | 220 if (serverFutures.isEmpty) { |
| 225 startProcessQueue(); | 221 startProcessQueue(); |
| 226 } else { | 222 } else { |
| 227 Future.wait(serverFutures).then((_) => startProcessQueue()); | 223 Future.wait(serverFutures).then((_) => startProcessQueue()); |
| 228 } | 224 } |
| 229 } | 225 } |
| 226 |
| 227 void main() { |
| 228 var optionsParser = new TestOptionsParser(); |
| 229 var configurations = optionsParser.parse(new Options().arguments); |
| 230 if (configurations != null || configurations.length > 0) { |
| 231 testConfigurations(configurations); |
| 232 } |
| 233 } |
| 234 |
| OLD | NEW |