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 441 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
452 help='Filters tests googletest-style.') | 452 help='Filters tests googletest-style.') |
453 group.add_argument( | 453 group.add_argument( |
454 '--package-filter', dest='package_filter', | 454 '--package-filter', dest='package_filter', |
455 help='Filters tests by package.') | 455 help='Filters tests by package.') |
456 group.add_argument( | 456 group.add_argument( |
457 '--runner-filter', dest='runner_filter', | 457 '--runner-filter', dest='runner_filter', |
458 help='Filters tests by runner class. Must be fully qualified.') | 458 help='Filters tests by runner class. Must be fully qualified.') |
459 group.add_argument( | 459 group.add_argument( |
460 '--sdk-version', dest='sdk_version', type=int, | 460 '--sdk-version', dest='sdk_version', type=int, |
461 help='The Android SDK version.') | 461 help='The Android SDK version.') |
462 group.add_argument( | |
463 '--coverage-dir', dest='coverage_dir', | |
464 help='Directory to store coverage info.') | |
465 AddCommonOptions(parser) | 462 AddCommonOptions(parser) |
466 | 463 |
467 | 464 |
468 def AddMonkeyTestOptions(parser): | 465 def AddMonkeyTestOptions(parser): |
469 """Adds monkey test options to |parser|.""" | 466 """Adds monkey test options to |parser|.""" |
470 | 467 |
471 group = parser.add_argument_group('Monkey Test Options') | 468 group = parser.add_argument_group('Monkey Test Options') |
472 group.add_argument( | 469 group.add_argument( |
473 '--package', required=True, choices=constants.PACKAGE_INFO.keys(), | 470 '--package', required=True, choices=constants.PACKAGE_INFO.keys(), |
474 metavar='PACKAGE', help='Package under test.') | 471 metavar='PACKAGE', help='Package under test.') |
(...skipping 491 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
966 if e.is_infra_error: | 963 if e.is_infra_error: |
967 return constants.INFRA_EXIT_CODE | 964 return constants.INFRA_EXIT_CODE |
968 return constants.ERROR_EXIT_CODE | 965 return constants.ERROR_EXIT_CODE |
969 except: # pylint: disable=W0702 | 966 except: # pylint: disable=W0702 |
970 logging.exception('Unrecognized error occurred.') | 967 logging.exception('Unrecognized error occurred.') |
971 return constants.ERROR_EXIT_CODE | 968 return constants.ERROR_EXIT_CODE |
972 | 969 |
973 | 970 |
974 if __name__ == '__main__': | 971 if __name__ == '__main__': |
975 sys.exit(main()) | 972 sys.exit(main()) |
OLD | NEW |