OLD | NEW |
1 #!/usr/bin/env python | 1 #!/usr/bin/env python |
2 # | 2 # |
3 # Copyright 2013 The Chromium Authors. All rights reserved. | 3 # Copyright 2013 The Chromium Authors. All rights reserved. |
4 # Use of this source code is governed by a BSD-style license that can be | 4 # Use of this source code is governed by a BSD-style license that can be |
5 # found in the LICENSE file. | 5 # found in the LICENSE file. |
6 | 6 |
7 """Runs all types of tests from one unified interface. | 7 """Runs all types of tests from one unified interface. |
8 | 8 |
9 TODO(gkanwar): | 9 TODO(gkanwar): |
10 * Add options to run Monkey tests. | 10 * Add options to run Monkey tests. |
(...skipping 199 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
210 '--test-apk=ChromiumTestShellTest') | 210 '--test-apk=ChromiumTestShellTest') |
211 | 211 |
212 AddJavaTestOptions(option_parser) | 212 AddJavaTestOptions(option_parser) |
213 AddCommonOptions(option_parser) | 213 AddCommonOptions(option_parser) |
214 | 214 |
215 option_parser.add_option('-j', '--java_only', action='store_true', | 215 option_parser.add_option('-j', '--java_only', action='store_true', |
216 default=False, help='Run only the Java tests.') | 216 default=False, help='Run only the Java tests.') |
217 option_parser.add_option('-p', '--python_only', action='store_true', | 217 option_parser.add_option('-p', '--python_only', action='store_true', |
218 default=False, | 218 default=False, |
219 help='Run only the host-driven tests.') | 219 help='Run only the host-driven tests.') |
220 option_parser.add_option('--python_test_root', '--host-driven-root', | 220 option_parser.add_option('--host-driven-root', |
221 dest='host_driven_root', | |
222 help='Root of the host-driven tests.') | 221 help='Root of the host-driven tests.') |
223 option_parser.add_option('-w', '--wait_debugger', dest='wait_for_debugger', | 222 option_parser.add_option('-w', '--wait_debugger', dest='wait_for_debugger', |
224 action='store_true', | 223 action='store_true', |
225 help='Wait for debugger.') | 224 help='Wait for debugger.') |
226 option_parser.add_option( | 225 option_parser.add_option( |
227 '--test-apk', dest='test_apk', | 226 '--test-apk', dest='test_apk', |
228 help=('The name of the apk containing the tests ' | 227 help=('The name of the apk containing the tests ' |
229 '(without the .apk extension; e.g. "ContentShellTest"). ' | 228 '(without the .apk extension; e.g. "ContentShellTest"). ' |
230 'Alternatively, this can be a full path to the apk.')) | 229 'Alternatively, this can be a full path to the apk.')) |
231 | 230 |
(...skipping 518 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
750 option_parser.error('Invalid command.') | 749 option_parser.error('Invalid command.') |
751 command = argv[1] | 750 command = argv[1] |
752 VALID_COMMANDS[command].add_options_func(option_parser) | 751 VALID_COMMANDS[command].add_options_func(option_parser) |
753 options, args = option_parser.parse_args(argv) | 752 options, args = option_parser.parse_args(argv) |
754 return VALID_COMMANDS[command].run_command_func( | 753 return VALID_COMMANDS[command].run_command_func( |
755 command, options, args, option_parser) | 754 command, options, args, option_parser) |
756 | 755 |
757 | 756 |
758 if __name__ == '__main__': | 757 if __name__ == '__main__': |
759 sys.exit(main(sys.argv)) | 758 sys.exit(main(sys.argv)) |
OLD | NEW |