| Index: tools/test.dart
|
| diff --git a/tools/test.dart b/tools/test.dart
|
| index b61d1abf83436458170671f5a9373c0eff231f96..9ee33f0d139cd20124608e65c3369e0524d79b78 100755
|
| --- a/tools/test.dart
|
| +++ b/tools/test.dart
|
| @@ -23,15 +23,22 @@
|
| main() {
|
| var startTime = new Date.now();
|
| var optionsParser = new TestOptionsParser();
|
| - var configurations = optionsParser.parse(new Options().arguments);
|
| + List<Map> configurations = optionsParser.parse(new Options().arguments);
|
| if (configurations == null) return;
|
| +
|
| // Extract global options from first configuration.
|
| var firstConf = configurations[0];
|
| - var queue = new ProcessQueue(firstConf['tasks'],
|
| - firstConf['progress'],
|
| - startTime);
|
| Map<String, RegExp> selectors = firstConf['selectors'];
|
| - for (var conf in configurations) {
|
| + var maxProcesses = firstConf['tasks'];
|
| + var progressIndicator = firstConf['progress'];
|
| +
|
| + var currentConfiguration = 0;
|
| + bool enqueueConfiguration(ProcessQueue queue) {
|
| + if (currentConfiguration == configurations.length) {
|
| + return false;
|
| + }
|
| +
|
| + var conf = configurations[currentConfiguration++];
|
| if (selectors.containsKey('samples')) {
|
| queue.addTestSuite(new SamplesTestSuite(conf));
|
| }
|
| @@ -65,5 +72,13 @@ main() {
|
| if (selectors.containsKey('leg_only')) {
|
| queue.addTestSuite(new LegOnlyTestSuite(conf));
|
| }
|
| +
|
| + return true;
|
| }
|
| +
|
| + // Start process queue.
|
| + var queue = new ProcessQueue(maxProcesses,
|
| + progressIndicator,
|
| + startTime,
|
| + enqueueConfiguration);
|
| }
|
|
|