Chromium Code Reviews| Index: tools/test-runtime.dart |
| diff --git a/tools/test-runtime.dart b/tools/test-runtime.dart |
| index 7f376088a47e123cc3f22e59ff13185e014ec426..a981df82e5d1debf6859f52d8431a4d171c53ce9 100644 |
| --- a/tools/test-runtime.dart |
| +++ b/tools/test-runtime.dart |
| @@ -22,15 +22,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; |
|
Bill Hesse
2011/12/02 13:10:06
When I did the equivalent thing for serializing mu
Mads Ager (google)
2011/12/02 13:32:49
Done.
|
| + bool enqueueConfiguration(ProcessQueue queue) { |
| + if (currentConfiguration == configurations.length) { |
| + return false; |
| + } |
| + |
| + var conf = configurations[currentConfiguration++]; |
| if (selectors.containsKey('standalone')) { |
| queue.addTestSuite(new StandaloneTestSuite(conf)); |
| } |
| @@ -52,5 +59,13 @@ main() { |
| if (conf['component'] == 'vm' && selectors.containsKey('vm')) { |
| queue.addTestSuite(new VMTestSuite(conf)); |
| } |
| + |
| + return true; |
| } |
| + |
| + // Start process queue. |
| + var queue = new ProcessQueue(firstConf['tasks'], |
| + firstConf['progress'], |
| + startTime, |
| + enqueueConfiguration); |
| } |