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

Side by Side Diff: utils/testrunner/options.dart

Issue 10919249: Make args package follow new layout. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Fix path to args.dart in testrunner. Created 8 years, 3 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
« no previous file with comments | « utils/pub/pub.dart ('k') | utils/testrunner/testrunner.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 /** Create and return an options parser for the test runner. */ 5 /** Create and return an options parser for the test runner. */
6 ArgParser getOptionParser() { 6 ArgParser getOptionParser() {
7 var parser = new ArgParser(); 7 var parser = new ArgParser();
8 8
9 parser.addOption('help', abbr: '?', 9 parser.addOption('help', abbr: '?',
10 help: 'Show usage information.'); 10 help: 'Show usage information.');
(...skipping 202 matching lines...) Expand 10 before | Expand all | Expand 10 after
213 } 213 }
214 } 214 }
215 } 215 }
216 // Finally, we add options from the command line. These have the highest 216 // Finally, we add options from the command line. These have the highest
217 // precedence of all. 217 // precedence of all.
218 options.addAll(commandLineArgs); 218 options.addAll(commandLineArgs);
219 // Now try parse the whole collection of options, and if this fails, 219 // Now try parse the whole collection of options, and if this fails,
220 // issue a usage message. 220 // issue a usage message.
221 try { 221 try {
222 return optionsParser.parse(options); 222 return optionsParser.parse(options);
223 } catch (var e) { 223 } catch (e) {
224 print(e); 224 print(e);
225 print('Usage: testrunner <options> [<directory or file> ...]'); 225 print('Usage: testrunner <options> [<directory or file> ...]');
226 print(optionsParser.getUsage()); 226 print(optionsParser.getUsage());
227 return null; 227 return null;
228 } 228 }
229 } 229 }
230 230
231 /** Perform some sanity checking of the configuration. */ 231 /** Perform some sanity checking of the configuration. */
232 bool isSane(ArgResults config) { 232 bool isSane(ArgResults config) {
233 if (config == null) { 233 if (config == null) {
(...skipping 13 matching lines...) Expand all
247 return false; 247 return false;
248 } 248 }
249 if (config['layout'] && config['runtime'] == 'vm') { 249 if (config['layout'] && config['runtime'] == 'vm') {
250 print('Layout tests must use --runtime values of "drt-dart" or "drt-js"'); 250 print('Layout tests must use --runtime values of "drt-dart" or "drt-js"');
251 return false; 251 return false;
252 } 252 }
253 return true; 253 return true;
254 } 254 }
255 255
256 256
OLDNEW
« no previous file with comments | « utils/pub/pub.dart ('k') | utils/testrunner/testrunner.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698