Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(228)

Unified Diff: tools/test-runtime.dart

Issue 8773036: Make multi tests work with DartC. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Reworking Created 9 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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);
}

Powered by Google App Engine
This is Rietveld 408576698