| 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 17 matching lines...) Expand all Loading... |
| 28 if (configurations == null) return; | 28 if (configurations == null) return; |
| 29 | 29 |
| 30 // Extract global options from first configuration. | 30 // Extract global options from first configuration. |
| 31 var firstConf = configurations[0]; | 31 var firstConf = configurations[0]; |
| 32 Map<String, RegExp> selectors = firstConf['selectors']; | 32 Map<String, RegExp> selectors = firstConf['selectors']; |
| 33 var maxProcesses = firstConf['tasks']; | 33 var maxProcesses = firstConf['tasks']; |
| 34 var progressIndicator = firstConf['progress']; | 34 var progressIndicator = firstConf['progress']; |
| 35 var verbose = firstConf['verbose']; | 35 var verbose = firstConf['verbose']; |
| 36 var printTiming = firstConf['time']; | 36 var printTiming = firstConf['time']; |
| 37 var listTests = firstConf['list']; | 37 var listTests = firstConf['list']; |
| 38 var keepGeneratedTests = firstConf['keep-generated-tests']; |
| 38 | 39 |
| 39 var configurationIterator = configurations.iterator(); | 40 var configurationIterator = configurations.iterator(); |
| 40 bool enqueueConfiguration(ProcessQueue queue) { | 41 bool enqueueConfiguration(ProcessQueue queue) { |
| 41 if (!configurationIterator.hasNext()) { | 42 if (!configurationIterator.hasNext()) { |
| 42 return false; | 43 return false; |
| 43 } | 44 } |
| 44 | 45 |
| 45 var conf = configurationIterator.next(); | 46 var conf = configurationIterator.next(); |
| 46 if (selectors.containsKey('samples')) { | 47 if (selectors.containsKey('samples')) { |
| 47 queue.addTestSuite(new SamplesTestSuite(conf)); | 48 queue.addTestSuite(new SamplesTestSuite(conf)); |
| (...skipping 28 matching lines...) Expand all Loading... |
| 76 | 77 |
| 77 return true; | 78 return true; |
| 78 } | 79 } |
| 79 | 80 |
| 80 // Start process queue. | 81 // Start process queue. |
| 81 var queue = new ProcessQueue(maxProcesses, | 82 var queue = new ProcessQueue(maxProcesses, |
| 82 progressIndicator, | 83 progressIndicator, |
| 83 startTime, | 84 startTime, |
| 84 printTiming, | 85 printTiming, |
| 85 enqueueConfiguration, | 86 enqueueConfiguration, |
| 86 verbose: verbose, | 87 verbose, |
| 87 listTests: listTests); | 88 listTests, |
| 89 keepGeneratedTests); |
| 88 } | 90 } |
| OLD | NEW |