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

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

Issue 11817012: Migration of testing scripts in tools/ to libv2 (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: added binaries Created 7 years, 11 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 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
53 configurations.addAll(optionsParser.parse(arguments)); 53 configurations.addAll(optionsParser.parse(arguments));
54 } 54 }
55 if (configurations == null || configurations.isEmpty) return; 55 if (configurations == null || configurations.isEmpty) return;
56 56
57 var firstConfiguration = configurations[0]; 57 var firstConfiguration = configurations[0];
58 Map<String, RegExp> selectors = firstConfiguration['selectors']; 58 Map<String, RegExp> selectors = firstConfiguration['selectors'];
59 var maxProcesses = firstConfiguration['tasks']; 59 var maxProcesses = firstConfiguration['tasks'];
60 var verbose = firstConfiguration['verbose']; 60 var verbose = firstConfiguration['verbose'];
61 var listTests = firstConfiguration['list']; 61 var listTests = firstConfiguration['list'];
62 62
63 var configurationIterator = configurations.iterator(); 63 var configurationIterator = configurations.iterator;
64 void enqueueConfiguration(ProcessQueue queue) { 64 void enqueueConfiguration(ProcessQueue queue) {
65 if (!configurationIterator.hasNext) return; 65 if (!configurationIterator.moveNext()) return;
66 var configuration = configurationIterator.next(); 66 var configuration = configurationIterator.current;
67 for (String selector in selectors.keys) { 67 for (String selector in selectors.keys) {
68 if (selector == 'co19') { 68 if (selector == 'co19') {
69 queue.addTestSuite(new Co19TestSuite(configuration)); 69 queue.addTestSuite(new Co19TestSuite(configuration));
70 } else { 70 } else {
71 throw 'Error: unexpected selector: "$selector".'; 71 throw 'Error: unexpected selector: "$selector".';
72 } 72 }
73 } 73 }
74 } 74 }
75 75
76 // Start process queue. 76 // Start process queue.
77 var queue = new ProcessQueue(maxProcesses, 77 var queue = new ProcessQueue(maxProcesses,
78 'diff', 78 'diff',
79 startTime, 79 startTime,
80 false, 80 false,
81 enqueueConfiguration, 81 enqueueConfiguration,
82 () {}, 82 () {},
83 verbose, 83 verbose,
84 listTests); 84 listTests);
85 } 85 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698