| 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 var startTime = new Date.now(); | 28 var startTime = new Date.now(); |
| 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 | 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 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 88 if (selectors.containsKey('await')) { | 89 if (selectors.containsKey('await')) { |
| 89 queue.addTestSuite(new AwaitTestSuite(conf)); | 90 queue.addTestSuite(new AwaitTestSuite(conf)); |
| 90 } | 91 } |
| 91 | 92 |
| 92 return true; | 93 return true; |
| 93 } | 94 } |
| 94 | 95 |
| 95 // Start process queue. | 96 // Start process queue. |
| 96 var queue = new ProcessQueue(maxProcesses, | 97 var queue = new ProcessQueue(maxProcesses, |
| 97 progressIndicator, | 98 progressIndicator, |
| 99 verbose, |
| 98 startTime, | 100 startTime, |
| 99 enqueueConfiguration); | 101 enqueueConfiguration); |
| 100 } | 102 } |
| OLD | NEW |