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.') |
462 AddCommonOptions(parser) | 465 AddCommonOptions(parser) |
463 | 466 |
464 | 467 |
465 def AddMonkeyTestOptions(parser): | 468 def AddMonkeyTestOptions(parser): |
466 """Adds monkey test options to |parser|.""" | 469 """Adds monkey test options to |parser|.""" |
467 | 470 |
468 group = parser.add_argument_group('Monkey Test Options') | 471 group = parser.add_argument_group('Monkey Test Options') |
469 group.add_argument( | 472 group.add_argument( |
470 '--package', required=True, choices=constants.PACKAGE_INFO.keys(), | 473 '--package', required=True, choices=constants.PACKAGE_INFO.keys(), |
471 metavar='PACKAGE', help='Package under test.') | 474 metavar='PACKAGE', help='Package under test.') |
(...skipping 491 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
963 if e.is_infra_error: | 966 if e.is_infra_error: |
964 return constants.INFRA_EXIT_CODE | 967 return constants.INFRA_EXIT_CODE |
965 return constants.ERROR_EXIT_CODE | 968 return constants.ERROR_EXIT_CODE |
966 except: # pylint: disable=W0702 | 969 except: # pylint: disable=W0702 |
967 logging.exception('Unrecognized error occurred.') | 970 logging.exception('Unrecognized error occurred.') |
968 return constants.ERROR_EXIT_CODE | 971 return constants.ERROR_EXIT_CODE |
969 | 972 |
970 | 973 |
971 if __name__ == '__main__': | 974 if __name__ == '__main__': |
972 sys.exit(main()) | 975 sys.exit(main()) |
OLD | NEW |