| 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 // TODO(ager): Get rid of this version of test.dart when we don't have | 6 // TODO(ager): Get rid of this version of test.dart when we don't have |
| 7 // to worry about the special runtime checkout anymore. | 7 // to worry about the special runtime checkout anymore. |
| 8 | 8 |
| 9 #library("test"); | 9 #library("test"); |
| 10 | 10 |
| (...skipping 12 matching lines...) Expand all Loading... |
| 23 var startTime = new Date.now(); | 23 var startTime = new Date.now(); |
| 24 var optionsParser = new TestOptionsParser(); | 24 var optionsParser = new TestOptionsParser(); |
| 25 List<Map> configurations = optionsParser.parse(new Options().arguments); | 25 List<Map> configurations = optionsParser.parse(new Options().arguments); |
| 26 if (configurations == null) return; | 26 if (configurations == null) return; |
| 27 | 27 |
| 28 // Extract global options from first configuration. | 28 // Extract global options from first configuration. |
| 29 var firstConf = configurations[0]; | 29 var firstConf = configurations[0]; |
| 30 Map<String, RegExp> selectors = firstConf['selectors']; | 30 Map<String, RegExp> selectors = firstConf['selectors']; |
| 31 var maxProcesses = firstConf['tasks']; | 31 var maxProcesses = firstConf['tasks']; |
| 32 var progressIndicator = firstConf['progress']; | 32 var progressIndicator = firstConf['progress']; |
| 33 var verbose = firstConf['verbose']; |
| 33 | 34 |
| 34 var configurationIterator = configurations.iterator(); | 35 var configurationIterator = configurations.iterator(); |
| 35 bool enqueueConfiguration(ProcessQueue queue) { | 36 bool enqueueConfiguration(ProcessQueue queue) { |
| 36 if (!configurationIterator.hasNext()) { | 37 if (!configurationIterator.hasNext()) { |
| 37 return false; | 38 return false; |
| 38 } | 39 } |
| 39 | 40 |
| 40 var conf = configurationIterator.next(); | 41 var conf = configurationIterator.next(); |
| 41 if (selectors.containsKey('standalone')) { | 42 if (selectors.containsKey('standalone')) { |
| 42 queue.addTestSuite(new StandaloneTestSuite(conf)); | 43 queue.addTestSuite(new StandaloneTestSuite(conf)); |
| (...skipping 14 matching lines...) Expand all Loading... |
| 57 queue.addTestSuite(new StubGeneratorTestSuite(conf)); | 58 queue.addTestSuite(new StubGeneratorTestSuite(conf)); |
| 58 } | 59 } |
| 59 if (conf['component'] == 'vm' && selectors.containsKey('vm')) { | 60 if (conf['component'] == 'vm' && selectors.containsKey('vm')) { |
| 60 queue.addTestSuite(new VMTestSuite(conf)); | 61 queue.addTestSuite(new VMTestSuite(conf)); |
| 61 } | 62 } |
| 62 | 63 |
| 63 return true; | 64 return true; |
| 64 } | 65 } |
| 65 | 66 |
| 66 // Start process queue. | 67 // Start process queue. |
| 67 var queue = new ProcessQueue(firstConf['tasks'], | 68 var queue = new ProcessQueue(maxProcesses, |
| 68 firstConf['progress'], | 69 progressIndicator, |
| 70 verbose, |
| 69 startTime, | 71 startTime, |
| 70 enqueueConfiguration); | 72 enqueueConfiguration); |
| 71 } | 73 } |
| OLD | NEW |