| OLD | NEW |
| 1 #!/usr/bin/env dart | 1 #!/usr/bin/env dart |
| 2 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file | 2 // Copyright (c) 2011, 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 #library("test"); | 6 #library("test"); |
| 7 | 7 |
| 8 #import("testing/dart/test_runner.dart"); | 8 #import("testing/dart/test_runner.dart"); |
| 9 #import("testing/dart/test_options.dart"); | 9 #import("testing/dart/test_options.dart"); |
| 10 | 10 |
| (...skipping 23 matching lines...) Expand all Loading... |
| 34 if (configurations == null) return; | 34 if (configurations == null) return; |
| 35 | 35 |
| 36 // Extract global options from first configuration. | 36 // Extract global options from first configuration. |
| 37 var firstConf = configurations[0]; | 37 var firstConf = configurations[0]; |
| 38 Map<String, RegExp> selectors = firstConf['selectors']; | 38 Map<String, RegExp> selectors = firstConf['selectors']; |
| 39 var maxProcesses = firstConf['tasks']; | 39 var maxProcesses = firstConf['tasks']; |
| 40 var progressIndicator = firstConf['progress']; | 40 var progressIndicator = firstConf['progress']; |
| 41 var verbose = firstConf['verbose']; | 41 var verbose = firstConf['verbose']; |
| 42 var printTiming = firstConf['time']; | 42 var printTiming = firstConf['time']; |
| 43 var listTests = firstConf['list']; | 43 var listTests = firstConf['list']; |
| 44 var keepGeneratedTests = firstConf['keep-generated-tests']; |
| 44 | 45 |
| 45 var configurationIterator = configurations.iterator(); | 46 var configurationIterator = configurations.iterator(); |
| 46 bool enqueueConfiguration(ProcessQueue queue) { | 47 bool enqueueConfiguration(ProcessQueue queue) { |
| 47 if (!configurationIterator.hasNext()) { | 48 if (!configurationIterator.hasNext()) { |
| 48 return false; | 49 return false; |
| 49 } | 50 } |
| 50 | 51 |
| 51 var conf = configurationIterator.next(); | 52 var conf = configurationIterator.next(); |
| 52 if (selectors.containsKey('samples')) { | 53 if (selectors.containsKey('samples')) { |
| 53 queue.addTestSuite(new SamplesTestSuite(conf)); | 54 queue.addTestSuite(new SamplesTestSuite(conf)); |
| (...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 106 | 107 |
| 107 return true; | 108 return true; |
| 108 } | 109 } |
| 109 | 110 |
| 110 // Start process queue. | 111 // Start process queue. |
| 111 var queue = new ProcessQueue(maxProcesses, | 112 var queue = new ProcessQueue(maxProcesses, |
| 112 progressIndicator, | 113 progressIndicator, |
| 113 startTime, | 114 startTime, |
| 114 printTiming, | 115 printTiming, |
| 115 enqueueConfiguration, | 116 enqueueConfiguration, |
| 116 verbose: verbose, | 117 verbose, |
| 117 listTests: listTests); | 118 listTests, |
| 119 keepGeneratedTests); |
| 118 } | 120 } |
| OLD | NEW |