| 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 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 47 #import("../utils/tests/css/test_config.dart"); | 47 #import("../utils/tests/css/test_config.dart"); |
| 48 #import("../utils/tests/import_mapper/test_config.dart"); | 48 #import("../utils/tests/import_mapper/test_config.dart"); |
| 49 #import("../utils/tests/peg/test_config.dart"); | 49 #import("../utils/tests/peg/test_config.dart"); |
| 50 | 50 |
| 51 main() { | 51 main() { |
| 52 var startTime = new Date.now(); | 52 var startTime = new Date.now(); |
| 53 var optionsParser = new TestOptionsParser(); | 53 var optionsParser = new TestOptionsParser(); |
| 54 List<Map> configurations = optionsParser.parse(new Options().arguments); | 54 List<Map> configurations = optionsParser.parse(new Options().arguments); |
| 55 if (configurations == null) return; | 55 if (configurations == null) return; |
| 56 | 56 |
| 57 // Print the configurations being run by this excution of test.dart. | |
| 58 StringBuffer sb = new StringBuffer('Test configuration'); | |
| 59 sb.add(configurations.length > 1 ? 's:' : ':'); | |
| 60 for (Map conf in configurations) { | |
| 61 sb.add(' ${conf["component"]}_${conf["mode"]}_${conf["arch"]}'); | |
| 62 if (conf['checked']) sb.add('_checked'); | |
| 63 } | |
| 64 print(sb); | |
| 65 | |
| 66 // Extract global options from first configuration. | 57 // Extract global options from first configuration. |
| 67 var firstConf = configurations[0]; | 58 var firstConf = configurations[0]; |
| 68 Map<String, RegExp> selectors = firstConf['selectors']; | 59 Map<String, RegExp> selectors = firstConf['selectors']; |
| 69 var maxProcesses = firstConf['tasks']; | 60 var maxProcesses = firstConf['tasks']; |
| 70 var progressIndicator = firstConf['progress']; | 61 var progressIndicator = firstConf['progress']; |
| 71 var verbose = firstConf['verbose']; | 62 var verbose = firstConf['verbose']; |
| 72 var printTiming = firstConf['time']; | 63 var printTiming = firstConf['time']; |
| 73 var listTests = firstConf['list']; | 64 var listTests = firstConf['list']; |
| 74 var keepGeneratedTests = firstConf['keep-generated-tests']; | 65 var keepGeneratedTests = firstConf['keep-generated-tests']; |
| 75 | 66 |
| (...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 145 // Start process queue. | 136 // Start process queue. |
| 146 var queue = new ProcessQueue(maxProcesses, | 137 var queue = new ProcessQueue(maxProcesses, |
| 147 progressIndicator, | 138 progressIndicator, |
| 148 startTime, | 139 startTime, |
| 149 printTiming, | 140 printTiming, |
| 150 enqueueConfiguration, | 141 enqueueConfiguration, |
| 151 verbose, | 142 verbose, |
| 152 listTests, | 143 listTests, |
| 153 keepGeneratedTests); | 144 keepGeneratedTests); |
| 154 } | 145 } |
| OLD | NEW |