| 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 276 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 287 '--screenshot-directory', dest='screenshot_dir', type=os.path.realpath, | 287 '--screenshot-directory', dest='screenshot_dir', type=os.path.realpath, |
| 288 help='Capture screenshots of test failures') | 288 help='Capture screenshots of test failures') |
| 289 argument_group.add_argument( | 289 argument_group.add_argument( |
| 290 '--save-perf-json', action='store_true', | 290 '--save-perf-json', action='store_true', |
| 291 help='Saves the JSON file for each UI Perf test.') | 291 help='Saves the JSON file for each UI Perf test.') |
| 292 argument_group.add_argument( | 292 argument_group.add_argument( |
| 293 '--official-build', action='store_true', help='Run official build tests.') | 293 '--official-build', action='store_true', help='Run official build tests.') |
| 294 argument_group.add_argument( | 294 argument_group.add_argument( |
| 295 '--disable-dalvik-asserts', dest='set_asserts', action='store_false', | 295 '--disable-dalvik-asserts', dest='set_asserts', action='store_false', |
| 296 default=True, help='Removes the dalvik.vm.enableassertions property') | 296 default=True, help='Removes the dalvik.vm.enableassertions property') |
| 297 argument_group.add_argument( |
| 298 '--gtest_also_run_disabled_tests', '--gtest-also-run-disabled-tests', |
| 299 dest='run_disabled', action='store_true', |
| 300 help='Also run disabled tests if applicable.') |
| 297 | 301 |
| 298 | 302 |
| 299 | 303 |
| 300 def ProcessJavaTestOptions(args): | 304 def ProcessJavaTestOptions(args): |
| 301 """Processes options/arguments and populates |options| with defaults.""" | 305 """Processes options/arguments and populates |options| with defaults.""" |
| 302 | 306 |
| 303 # TODO(jbudorick): Handle most of this function in argparse. | 307 # TODO(jbudorick): Handle most of this function in argparse. |
| 304 if args.annotation_str: | 308 if args.annotation_str: |
| 305 args.annotations = args.annotation_str.split(',') | 309 args.annotations = args.annotation_str.split(',') |
| 306 elif args.test_filter: | 310 elif args.test_filter: |
| (...skipping 553 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 860 if e.is_infra_error: | 864 if e.is_infra_error: |
| 861 return constants.INFRA_EXIT_CODE | 865 return constants.INFRA_EXIT_CODE |
| 862 return constants.ERROR_EXIT_CODE | 866 return constants.ERROR_EXIT_CODE |
| 863 except: # pylint: disable=W0702 | 867 except: # pylint: disable=W0702 |
| 864 logging.exception('Unrecognized error occurred.') | 868 logging.exception('Unrecognized error occurred.') |
| 865 return constants.ERROR_EXIT_CODE | 869 return constants.ERROR_EXIT_CODE |
| 866 | 870 |
| 867 | 871 |
| 868 if __name__ == '__main__': | 872 if __name__ == '__main__': |
| 869 sys.exit(main()) | 873 sys.exit(main()) |
| OLD | NEW |