| OLD | NEW |
| 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 part of testrunner; |
| 6 |
| 5 /** Create and return an options parser for the test runner. */ | 7 /** Create and return an options parser for the test runner. */ |
| 6 ArgParser getOptionParser() { | 8 ArgParser getOptionParser() { |
| 7 var parser = new ArgParser(); | 9 var parser = new ArgParser(); |
| 8 | 10 |
| 9 parser.addOption('help', abbr: '?', | 11 parser.addOption('help', abbr: '?', |
| 10 help: 'Show usage information.'); | 12 help: 'Show usage information.'); |
| 11 | 13 |
| 12 parser.addOption('runtime', abbr: 'r', defaultsTo: 'vm', | 14 parser.addOption('runtime', abbr: 'r', defaultsTo: 'vm', |
| 13 help: 'Where the tests should be run.', | 15 help: 'Where the tests should be run.', |
| 14 allowed: ['vm', 'drt-dart', 'drt-js'], | 16 allowed: ['vm', 'drt-dart', 'drt-js'], |
| (...skipping 242 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 257 } | 259 } |
| 258 if ((config['layout-text'] || config['layout-pixel']) && | 260 if ((config['layout-text'] || config['layout-pixel']) && |
| 259 config['runtime'] == 'vm') { | 261 config['runtime'] == 'vm') { |
| 260 print('Layout tests must use --runtime values of "drt-dart" or "drt-js"'); | 262 print('Layout tests must use --runtime values of "drt-dart" or "drt-js"'); |
| 261 return false; | 263 return false; |
| 262 } | 264 } |
| 263 return true; | 265 return true; |
| 264 } | 266 } |
| 265 | 267 |
| 266 | 268 |
| OLD | NEW |