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

Unified Diff: tools/test.dart

Issue 8773036: Make multi tests work with DartC. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Address comments 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
« no previous file with comments | « no previous file | tools/test-runtime.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/test.dart
diff --git a/tools/test.dart b/tools/test.dart
index b61d1abf83436458170671f5a9373c0eff231f96..f1af2b6f1bdea78128d25ae7270f52ed64e6e293 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 configurationIterator = configurations.iterator();
+ bool enqueueConfiguration(ProcessQueue queue) {
+ if (!configurationIterator.hasNext()) {
+ return false;
+ }
+
+ var conf = configurationIterator.next();
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);
}
« no previous file with comments | « no previous file | tools/test-runtime.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698