| 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 20 matching lines...) Expand all Loading... |
| 31 List<Map> configurations = optionsParser.parse(new Options().arguments); | 31 List<Map> configurations = optionsParser.parse(new Options().arguments); |
| 32 if (configurations == null) return; | 32 if (configurations == null) return; |
| 33 | 33 |
| 34 // Extract global options from first configuration. | 34 // Extract global options from first configuration. |
| 35 var firstConf = configurations[0]; | 35 var firstConf = configurations[0]; |
| 36 Map<String, RegExp> selectors = firstConf['selectors']; | 36 Map<String, RegExp> selectors = firstConf['selectors']; |
| 37 var maxProcesses = firstConf['tasks']; | 37 var maxProcesses = firstConf['tasks']; |
| 38 var progressIndicator = firstConf['progress']; | 38 var progressIndicator = firstConf['progress']; |
| 39 var verbose = firstConf['verbose']; | 39 var verbose = firstConf['verbose']; |
| 40 var printTiming = firstConf['time']; | 40 var printTiming = firstConf['time']; |
| 41 var listTests = firstConf['list']; |
| 41 | 42 |
| 42 var configurationIterator = configurations.iterator(); | 43 var configurationIterator = configurations.iterator(); |
| 43 bool enqueueConfiguration(ProcessQueue queue) { | 44 bool enqueueConfiguration(ProcessQueue queue) { |
| 44 if (!configurationIterator.hasNext()) { | 45 if (!configurationIterator.hasNext()) { |
| 45 return false; | 46 return false; |
| 46 } | 47 } |
| 47 | 48 |
| 48 var conf = configurationIterator.next(); | 49 var conf = configurationIterator.next(); |
| 49 if (selectors.containsKey('samples')) { | 50 if (selectors.containsKey('samples')) { |
| 50 queue.addTestSuite(new SamplesTestSuite(conf)); | 51 queue.addTestSuite(new SamplesTestSuite(conf)); |
| (...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 94 if (selectors.containsKey('await')) { | 95 if (selectors.containsKey('await')) { |
| 95 queue.addTestSuite(new AwaitTestSuite(conf)); | 96 queue.addTestSuite(new AwaitTestSuite(conf)); |
| 96 } | 97 } |
| 97 | 98 |
| 98 return true; | 99 return true; |
| 99 } | 100 } |
| 100 | 101 |
| 101 // Start process queue. | 102 // Start process queue. |
| 102 var queue = new ProcessQueue(maxProcesses, | 103 var queue = new ProcessQueue(maxProcesses, |
| 103 progressIndicator, | 104 progressIndicator, |
| 104 verbose, | |
| 105 startTime, | 105 startTime, |
| 106 printTiming, | 106 printTiming, |
| 107 enqueueConfiguration); | 107 enqueueConfiguration, |
| 108 verbose: verbose, |
| 109 listTests: listTests); |
| 108 } | 110 } |
| OLD | NEW |