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

Side by Side Diff: tools/testing/dart/co19_test.dart

Issue 11091070: Change Process.start to return a future that completes with a (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Restructure to get rid of _onStart and _onError Created 8 years, 2 months 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 /** 5 /**
6 * Tool for running co19 tests. Used when updating co19. 6 * Tool for running co19 tests. Used when updating co19.
7 * 7 *
8 * Currently, this tool is merely a convenience around multiple 8 * Currently, this tool is merely a convenience around multiple
9 * invocations of test.dart. Long term, we hope to evolve this into a 9 * invocations of test.dart. Long term, we hope to evolve this into a
10 * script that can automate most of the tasks necessary when updating 10 * script that can automate most of the tasks necessary when updating
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
52 } 52 }
53 if (configurations == null || configurations.isEmpty()) return; 53 if (configurations == null || configurations.isEmpty()) return;
54 54
55 var firstConfiguration = configurations[0]; 55 var firstConfiguration = configurations[0];
56 Map<String, RegExp> selectors = firstConfiguration['selectors']; 56 Map<String, RegExp> selectors = firstConfiguration['selectors'];
57 var maxProcesses = firstConfiguration['tasks']; 57 var maxProcesses = firstConfiguration['tasks'];
58 var verbose = firstConfiguration['verbose']; 58 var verbose = firstConfiguration['verbose'];
59 var listTests = firstConfiguration['list']; 59 var listTests = firstConfiguration['list'];
60 60
61 var configurationIterator = configurations.iterator(); 61 var configurationIterator = configurations.iterator();
62 bool enqueueConfiguration(ProcessQueue queue) { 62 void enqueueConfiguration(ProcessQueue queue) {
63 if (!configurationIterator.hasNext()) { 63 if (!configurationIterator.hasNext()) return;
64 return false;
65 }
66
67 var configuration = configurationIterator.next(); 64 var configuration = configurationIterator.next();
68 for (String selector in selectors.getKeys()) { 65 for (String selector in selectors.getKeys()) {
69 if (selector == 'co19') { 66 if (selector == 'co19') {
70 queue.addTestSuite(new Co19TestSuite(configuration)); 67 queue.addTestSuite(new Co19TestSuite(configuration));
71 } else { 68 } else {
72 throw 'Error: unexpected selector: "$selector".'; 69 throw 'Error: unexpected selector: "$selector".';
73 } 70 }
74 } 71 }
75 return true;
76 } 72 }
77 73
78 // Start process queue. 74 // Start process queue.
79 var queue = new ProcessQueue(maxProcesses, 75 var queue = new ProcessQueue(maxProcesses,
80 'diff', 76 'diff',
81 startTime, 77 startTime,
82 false, 78 false,
83 enqueueConfiguration, 79 enqueueConfiguration,
84 () {}, 80 () {},
85 verbose, 81 verbose,
86 listTests); 82 listTests);
87 } 83 }
OLDNEW
« no previous file with comments | « tests/standalone/io/process_working_directory_test.dart ('k') | tools/testing/dart/test_runner.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698