| 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 322 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 333 'annotations.')) | 333 'annotations.')) |
| 334 argument_group.add_argument( | 334 argument_group.add_argument( |
| 335 '--screenshot-directory', dest='screenshot_dir', | 335 '--screenshot-directory', dest='screenshot_dir', |
| 336 help='Capture screenshots of test failures') | 336 help='Capture screenshots of test failures') |
| 337 argument_group.add_argument( | 337 argument_group.add_argument( |
| 338 '--save-perf-json', action='store_true', | 338 '--save-perf-json', action='store_true', |
| 339 help='Saves the JSON file for each UI Perf test.') | 339 help='Saves the JSON file for each UI Perf test.') |
| 340 argument_group.add_argument( | 340 argument_group.add_argument( |
| 341 '--official-build', action='store_true', help='Run official build tests.') | 341 '--official-build', action='store_true', help='Run official build tests.') |
| 342 argument_group.add_argument( | 342 argument_group.add_argument( |
| 343 '--test_data', '--test-data', action='append', default=[], | |
| 344 help=('Each instance defines a directory of test data that should be ' | |
| 345 'copied to the target(s) before running the tests. The argument ' | |
| 346 'should be of the form <target>:<source>, <target> is relative to ' | |
| 347 'the device data directory, and <source> is relative to the ' | |
| 348 'chromium build directory.')) | |
| 349 argument_group.add_argument( | |
| 350 '--disable-dalvik-asserts', dest='set_asserts', action='store_false', | 343 '--disable-dalvik-asserts', dest='set_asserts', action='store_false', |
| 351 default=True, help='Removes the dalvik.vm.enableassertions property') | 344 default=True, help='Removes the dalvik.vm.enableassertions property') |
| 352 | 345 |
| 353 | 346 |
| 354 | 347 |
| 355 def ProcessJavaTestOptions(args): | 348 def ProcessJavaTestOptions(args): |
| 356 """Processes options/arguments and populates |options| with defaults.""" | 349 """Processes options/arguments and populates |options| with defaults.""" |
| 357 | 350 |
| 358 # TODO(jbudorick): Handle most of this function in argparse. | 351 # TODO(jbudorick): Handle most of this function in argparse. |
| 359 if args.annotation_str: | 352 if args.annotation_str: |
| (...skipping 621 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 981 if e.is_infra_error: | 974 if e.is_infra_error: |
| 982 return constants.INFRA_EXIT_CODE | 975 return constants.INFRA_EXIT_CODE |
| 983 return constants.ERROR_EXIT_CODE | 976 return constants.ERROR_EXIT_CODE |
| 984 except: # pylint: disable=W0702 | 977 except: # pylint: disable=W0702 |
| 985 logging.exception('Unrecognized error occurred.') | 978 logging.exception('Unrecognized error occurred.') |
| 986 return constants.ERROR_EXIT_CODE | 979 return constants.ERROR_EXIT_CODE |
| 987 | 980 |
| 988 | 981 |
| 989 if __name__ == '__main__': | 982 if __name__ == '__main__': |
| 990 sys.exit(main()) | 983 sys.exit(main()) |
| OLD | NEW |