| 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 407 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 418 '--test-apk', | 418 '--test-apk', |
| 419 required=True, | 419 required=True, |
| 420 help='Path or name of the apk containing the tests.') | 420 help='Path or name of the apk containing the tests.') |
| 421 parser.add_argument( | 421 parser.add_argument( |
| 422 '--test-jar', | 422 '--test-jar', |
| 423 help='Path of jar containing test java files.') | 423 help='Path of jar containing test java files.') |
| 424 parser.add_argument( | 424 parser.add_argument( |
| 425 '--timeout-scale', | 425 '--timeout-scale', |
| 426 type=float, | 426 type=float, |
| 427 help='Factor by which timeouts should be scaled.') | 427 help='Factor by which timeouts should be scaled.') |
| 428 parser.add_argument( |
| 429 '--ui-screenshot-directory', |
| 430 dest='ui_screenshot_dir', type=os.path.realpath, |
| 431 help='Destination for screenshots captured by the tests') |
| 428 | 432 |
| 429 # These arguments are suppressed from the help text because they should | 433 # These arguments are suppressed from the help text because they should |
| 430 # only ever be specified by an intermediate script. | 434 # only ever be specified by an intermediate script. |
| 431 parser.add_argument( | 435 parser.add_argument( |
| 432 '--apk-under-test-incremental-install-script', | 436 '--apk-under-test-incremental-install-script', |
| 433 help=argparse.SUPPRESS) | 437 help=argparse.SUPPRESS) |
| 434 parser.add_argument( | 438 parser.add_argument( |
| 435 '--test-apk-incremental-install-script', | 439 '--test-apk-incremental-install-script', |
| 436 type=os.path.realpath, | 440 type=os.path.realpath, |
| 437 help=argparse.SUPPRESS) | 441 help=argparse.SUPPRESS) |
| (...skipping 487 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 925 if e.is_infra_error: | 929 if e.is_infra_error: |
| 926 return constants.INFRA_EXIT_CODE | 930 return constants.INFRA_EXIT_CODE |
| 927 return constants.ERROR_EXIT_CODE | 931 return constants.ERROR_EXIT_CODE |
| 928 except: # pylint: disable=W0702 | 932 except: # pylint: disable=W0702 |
| 929 logging.exception('Unrecognized error occurred.') | 933 logging.exception('Unrecognized error occurred.') |
| 930 return constants.ERROR_EXIT_CODE | 934 return constants.ERROR_EXIT_CODE |
| 931 | 935 |
| 932 | 936 |
| 933 if __name__ == '__main__': | 937 if __name__ == '__main__': |
| 934 sys.exit(main()) | 938 sys.exit(main()) |
| OLD | NEW |