| 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 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 57 // Extract global options from first configuration. | 57 // Extract global options from first configuration. |
| 58 var firstConf = configurations[0]; | 58 var firstConf = configurations[0]; |
| 59 Map<String, RegExp> selectors = firstConf['selectors']; | 59 Map<String, RegExp> selectors = firstConf['selectors']; |
| 60 var maxProcesses = firstConf['tasks']; | 60 var maxProcesses = firstConf['tasks']; |
| 61 var progressIndicator = firstConf['progress']; | 61 var progressIndicator = firstConf['progress']; |
| 62 var verbose = firstConf['verbose']; | 62 var verbose = firstConf['verbose']; |
| 63 var printTiming = firstConf['time']; | 63 var printTiming = firstConf['time']; |
| 64 var listTests = firstConf['list']; | 64 var listTests = firstConf['list']; |
| 65 var keepGeneratedTests = firstConf['keep-generated-tests']; | 65 var keepGeneratedTests = firstConf['keep-generated-tests']; |
| 66 | 66 |
| 67 // Print the configurations being run by this execution of |
| 68 // test.dart. However, don't do it if the silent progress indicator |
| 69 // is used. This is only needed because of the junit tests. |
| 70 if (progressIndicator != 'silent') { |
| 71 StringBuffer sb = new StringBuffer('Test configuration'); |
| 72 sb.add(configurations.length > 1 ? 's:' : ':'); |
| 73 for (Map conf in configurations) { |
| 74 sb.add(' ${conf["component"]}_${conf["mode"]}_${conf["arch"]}'); |
| 75 if (conf['checked']) sb.add('_checked'); |
| 76 } |
| 77 print(sb); |
| 78 } |
| 79 |
| 67 var configurationIterator = configurations.iterator(); | 80 var configurationIterator = configurations.iterator(); |
| 68 bool enqueueConfiguration(ProcessQueue queue) { | 81 bool enqueueConfiguration(ProcessQueue queue) { |
| 69 if (!configurationIterator.hasNext()) { | 82 if (!configurationIterator.hasNext()) { |
| 70 return false; | 83 return false; |
| 71 } | 84 } |
| 72 | 85 |
| 73 var conf = configurationIterator.next(); | 86 var conf = configurationIterator.next(); |
| 74 if (selectors.containsKey('samples')) { | 87 if (selectors.containsKey('samples')) { |
| 75 queue.addTestSuite(new SamplesTestSuite(conf)); | 88 queue.addTestSuite(new SamplesTestSuite(conf)); |
| 76 } | 89 } |
| (...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 136 // Start process queue. | 149 // Start process queue. |
| 137 var queue = new ProcessQueue(maxProcesses, | 150 var queue = new ProcessQueue(maxProcesses, |
| 138 progressIndicator, | 151 progressIndicator, |
| 139 startTime, | 152 startTime, |
| 140 printTiming, | 153 printTiming, |
| 141 enqueueConfiguration, | 154 enqueueConfiguration, |
| 142 verbose, | 155 verbose, |
| 143 listTests, | 156 listTests, |
| 144 keepGeneratedTests); | 157 keepGeneratedTests); |
| 145 } | 158 } |
| OLD | NEW |