| 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 172 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 183 help=('Run the test under a tool ' | 183 help=('Run the test under a tool ' |
| 184 '(use --tool help to list them)')) | 184 '(use --tool help to list them)')) |
| 185 group.add_argument('-d', '--device', dest='test_device', | 185 group.add_argument('-d', '--device', dest='test_device', |
| 186 help=('Target device for the test suite ' | 186 help=('Target device for the test suite ' |
| 187 'to run on.')) | 187 'to run on.')) |
| 188 group.add_argument('--blacklist-file', help='Device blacklist file.') | 188 group.add_argument('--blacklist-file', help='Device blacklist file.') |
| 189 group.add_argument('--enable-device-cache', action='store_true', | 189 group.add_argument('--enable-device-cache', action='store_true', |
| 190 help='Cache device state to disk between runs') | 190 help='Cache device state to disk between runs') |
| 191 group.add_argument('--incremental-install', action='store_true', | 191 group.add_argument('--incremental-install', action='store_true', |
| 192 help='Use an _incremental apk.') | 192 help='Use an _incremental apk.') |
| 193 group.add_argument('--enable-concurrent-adb', action='store_true', |
| 194 help='Run multiple adb commands at the same time, even ' |
| 195 'for the same device.') |
| 193 | 196 |
| 194 | 197 |
| 195 def AddGTestOptions(parser): | 198 def AddGTestOptions(parser): |
| 196 """Adds gtest options to |parser|.""" | 199 """Adds gtest options to |parser|.""" |
| 197 | 200 |
| 198 group = parser.add_argument_group('GTest Options') | 201 group = parser.add_argument_group('GTest Options') |
| 199 group.add_argument('-s', '--suite', dest='suite_name', | 202 group.add_argument('-s', '--suite', dest='suite_name', |
| 200 nargs='+', metavar='SUITE_NAME', required=True, | 203 nargs='+', metavar='SUITE_NAME', required=True, |
| 201 help='Executable name of the test suite to run.') | 204 help='Executable name of the test suite to run.') |
| 202 group.add_argument('--gtest_also_run_disabled_tests', | 205 group.add_argument('--gtest_also_run_disabled_tests', |
| (...skipping 856 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1059 if e.is_infra_error: | 1062 if e.is_infra_error: |
| 1060 return constants.INFRA_EXIT_CODE | 1063 return constants.INFRA_EXIT_CODE |
| 1061 return constants.ERROR_EXIT_CODE | 1064 return constants.ERROR_EXIT_CODE |
| 1062 except: # pylint: disable=W0702 | 1065 except: # pylint: disable=W0702 |
| 1063 logging.exception('Unrecognized error occurred.') | 1066 logging.exception('Unrecognized error occurred.') |
| 1064 return constants.ERROR_EXIT_CODE | 1067 return constants.ERROR_EXIT_CODE |
| 1065 | 1068 |
| 1066 | 1069 |
| 1067 if __name__ == '__main__': | 1070 if __name__ == '__main__': |
| 1068 sys.exit(main()) | 1071 sys.exit(main()) |
| OLD | NEW |