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 /** | 5 /** |
6 * This is an example of converting the args in test.dart to use this API. | 6 * This is an example of converting the args in test.dart to use this API. |
7 * It shows what it looks like to build an [ArgParser] and then, when the code | 7 * It shows what it looks like to build an [ArgParser] and then, when the code |
8 * is run, demonstrates what the generated usage text looks like. | 8 * is run, demonstrates what the generated usage text looks like. |
9 */ | 9 */ |
10 library example; | 10 library example; |
(...skipping 22 matching lines...) Expand all Loading... |
33 '(only valid with the following runtimes: none)', | 33 '(only valid with the following runtimes: none)', |
34 }); | 34 }); |
35 | 35 |
36 parser.addOption('runtime', abbr: 'r', defaultsTo: 'vm', | 36 parser.addOption('runtime', abbr: 'r', defaultsTo: 'vm', |
37 help: 'Where the tests should be run.', | 37 help: 'Where the tests should be run.', |
38 allowed: ['vm', 'd8', 'drt', 'dartium', 'ff', 'firefox', 'chrome', | 38 allowed: ['vm', 'd8', 'drt', 'dartium', 'ff', 'firefox', 'chrome', |
39 'safari', 'ie', 'opera', 'none'], | 39 'safari', 'ie', 'opera', 'none'], |
40 allowedHelp: { | 40 allowedHelp: { |
41 'vm': 'Run Dart code on the standalone dart vm.', | 41 'vm': 'Run Dart code on the standalone dart vm.', |
42 'd8': 'Run JavaScript from the command line using v8.', | 42 'd8': 'Run JavaScript from the command line using v8.', |
| 43 // TODO(antonm): rename flag. |
43 'drt': 'Run Dart or JavaScript in the headless version of Chrome,\n' | 44 'drt': 'Run Dart or JavaScript in the headless version of Chrome,\n' |
44 'DumpRenderTree.', | 45 'content shell.', |
45 'dartium': 'Run Dart or JavaScript in Dartium.', | 46 'dartium': 'Run Dart or JavaScript in Dartium.', |
46 'ff': 'Run JavaScript in Firefox', | 47 'ff': 'Run JavaScript in Firefox', |
47 'chrome': 'Run JavaScript in Chrome', | 48 'chrome': 'Run JavaScript in Chrome', |
48 'safari': 'Run JavaScript in Safari', | 49 'safari': 'Run JavaScript in Safari', |
49 'ie': 'Run JavaScript in Internet Explorer', | 50 'ie': 'Run JavaScript in Internet Explorer', |
50 'opera': 'Run JavaScript in Opera', | 51 'opera': 'Run JavaScript in Opera', |
51 'none': 'No runtime, compile only (for example, used for dartc static\n' | 52 'none': 'No runtime, compile only (for example, used for dartc static\n' |
52 'analysis tests).', | 53 'analysis tests).', |
53 }); | 54 }); |
54 | 55 |
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
109 For example if the normal command that will be executed | 110 For example if the normal command that will be executed |
110 is 'dart file.dart' and you specify special command | 111 is 'dart file.dart' and you specify special command |
111 'python -u valgrind.py @ suffix' the final command will be | 112 'python -u valgrind.py @ suffix' the final command will be |
112 'python -u valgrind.py dart file.dart suffix'"""); | 113 'python -u valgrind.py dart file.dart suffix'"""); |
113 | 114 |
114 parser.addFlag('time', | 115 parser.addFlag('time', |
115 help: 'Print timing information after running tests', | 116 help: 'Print timing information after running tests', |
116 defaultsTo: false); | 117 defaultsTo: false); |
117 | 118 |
118 parser.addOption('dart', help: 'Path to dart executable'); | 119 parser.addOption('dart', help: 'Path to dart executable'); |
119 parser.addOption('drt', help: 'Path to DumpRenderTree executable'); | 120 // TODO(antonm): rename the option. |
| 121 parser.addOption('drt', help: 'Path to content shell executable'); |
120 parser.addOption('dartium', help: 'Path to Dartium Chrome executable'); | 122 parser.addOption('dartium', help: 'Path to Dartium Chrome executable'); |
121 | 123 |
122 parser.addFlag('batch', abbr: 'b', | 124 parser.addFlag('batch', abbr: 'b', |
123 help: 'Run browser tests in batch mode', | 125 help: 'Run browser tests in batch mode', |
124 defaultsTo: true); | 126 defaultsTo: true); |
125 | 127 |
126 print(parser.getUsage()); | 128 print(parser.getUsage()); |
127 } | 129 } |
OLD | NEW |