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 import argparse | 9 import argparse |
10 import collections | 10 import collections |
(...skipping 511 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
522 args.extra_args) | 522 args.extra_args) |
523 | 523 |
524 def AddUirobotTestOptions(parser): | 524 def AddUirobotTestOptions(parser): |
525 """Adds uirobot test options to |option_parser|.""" | 525 """Adds uirobot test options to |option_parser|.""" |
526 group = parser.add_argument_group('Uirobot Test Options') | 526 group = parser.add_argument_group('Uirobot Test Options') |
527 | 527 |
528 group.add_argument('--app-under-test', required=True, | 528 group.add_argument('--app-under-test', required=True, |
529 help='APK to run tests on.') | 529 help='APK to run tests on.') |
530 group.add_argument( | 530 group.add_argument( |
531 '--minutes', default=5, type=int, | 531 '--minutes', default=5, type=int, |
532 help='Number of minutes to run uirobot test [default: %default].') | 532 help='Number of minutes to run uirobot test [default: %(default)s].') |
533 | 533 |
534 AddCommonOptions(parser) | 534 AddCommonOptions(parser) |
535 AddDeviceOptions(parser) | 535 AddDeviceOptions(parser) |
536 AddRemoteDeviceOptions(parser) | 536 AddRemoteDeviceOptions(parser) |
537 | 537 |
538 def AddPerfTestOptions(parser): | 538 def AddPerfTestOptions(parser): |
539 """Adds perf test options to |parser|.""" | 539 """Adds perf test options to |parser|.""" |
540 | 540 |
541 group = parser.add_argument_group('Perf Test Options') | 541 group = parser.add_argument_group('Perf Test Options') |
542 | 542 |
(...skipping 466 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1009 subparser = command_parsers.add_parser( | 1009 subparser = command_parsers.add_parser( |
1010 test_type, usage='%(prog)s [options]', help=config.help_txt) | 1010 test_type, usage='%(prog)s [options]', help=config.help_txt) |
1011 config.add_options_func(subparser) | 1011 config.add_options_func(subparser) |
1012 | 1012 |
1013 args = parser.parse_args() | 1013 args = parser.parse_args() |
1014 return RunTestsCommand(args, parser) | 1014 return RunTestsCommand(args, parser) |
1015 | 1015 |
1016 | 1016 |
1017 if __name__ == '__main__': | 1017 if __name__ == '__main__': |
1018 sys.exit(main()) | 1018 sys.exit(main()) |
OLD | NEW |