| 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 1008 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1019 config.add_options_func(subparser) | 1019 config.add_options_func(subparser) |
| 1020 | 1020 |
| 1021 args = parser.parse_args() | 1021 args = parser.parse_args() |
| 1022 | 1022 |
| 1023 try: | 1023 try: |
| 1024 return RunTestsCommand(args, parser) | 1024 return RunTestsCommand(args, parser) |
| 1025 except base_error.BaseError as e: | 1025 except base_error.BaseError as e: |
| 1026 logging.exception('Error occurred.') | 1026 logging.exception('Error occurred.') |
| 1027 if e.is_infra_error: | 1027 if e.is_infra_error: |
| 1028 return constants.INFRA_EXIT_CODE | 1028 return constants.INFRA_EXIT_CODE |
| 1029 else: | 1029 return constants.ERROR_EXIT_CODE |
| 1030 return constants.ERROR_EXIT_CODE | |
| 1031 except: # pylint: disable=W0702 | 1030 except: # pylint: disable=W0702 |
| 1032 logging.exception('Unrecognized error occurred.') | 1031 logging.exception('Unrecognized error occurred.') |
| 1033 return constants.ERROR_EXIT_CODE | 1032 return constants.ERROR_EXIT_CODE |
| 1034 | 1033 |
| 1035 | 1034 |
| 1036 if __name__ == '__main__': | 1035 if __name__ == '__main__': |
| 1037 sys.exit(main()) | 1036 sys.exit(main()) |
| OLD | NEW |