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