| 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 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 57 debug_or_release_group.add_argument( | 57 debug_or_release_group.add_argument( |
| 58 '--debug', action='store_const', const='Debug', dest='build_type', | 58 '--debug', action='store_const', const='Debug', dest='build_type', |
| 59 default=default_build_type, | 59 default=default_build_type, |
| 60 help=('If set, run test suites under out/Debug. ' | 60 help=('If set, run test suites under out/Debug. ' |
| 61 'Default is env var BUILDTYPE or Debug.')) | 61 'Default is env var BUILDTYPE or Debug.')) |
| 62 debug_or_release_group.add_argument( | 62 debug_or_release_group.add_argument( |
| 63 '--release', action='store_const', const='Release', dest='build_type', | 63 '--release', action='store_const', const='Release', dest='build_type', |
| 64 help=('If set, run test suites under out/Release. ' | 64 help=('If set, run test suites under out/Release. ' |
| 65 'Default is env var BUILDTYPE or Debug.')) | 65 'Default is env var BUILDTYPE or Debug.')) |
| 66 | 66 |
| 67 # TODO(jbudorick): Remove --build-directory once no bots use it. |
| 67 group.add_argument('--build-directory', dest='build_directory', | 68 group.add_argument('--build-directory', dest='build_directory', |
| 68 help=('Path to the directory in which build files are' | 69 help='DEPRECATED') |
| 69 ' located (should not include build type)')) | |
| 70 group.add_argument('--output-directory', dest='output_directory', | 70 group.add_argument('--output-directory', dest='output_directory', |
| 71 type=os.path.realpath, |
| 71 help=('Path to the directory in which build files are' | 72 help=('Path to the directory in which build files are' |
| 72 ' located (must include build type). This will take' | 73 ' located (must include build type). This will take' |
| 73 ' precedence over --debug, --release and' | 74 ' precedence over --debug, --release and' |
| 74 ' --build-directory')) | 75 ' --build-directory')) |
| 75 group.add_argument('--num_retries', '--num-retries', dest='num_retries', | 76 group.add_argument('--num_retries', '--num-retries', dest='num_retries', |
| 76 type=int, default=2, | 77 type=int, default=2, |
| 77 help=('Number of retries for a test before ' | 78 help=('Number of retries for a test before ' |
| 78 'giving up (default: %(default)s).')) | 79 'giving up (default: %(default)s).')) |
| 79 group.add_argument('-v', | 80 group.add_argument('-v', |
| 80 '--verbose', | 81 '--verbose', |
| (...skipping 857 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 938 if e.is_infra_error: | 939 if e.is_infra_error: |
| 939 return constants.INFRA_EXIT_CODE | 940 return constants.INFRA_EXIT_CODE |
| 940 return constants.ERROR_EXIT_CODE | 941 return constants.ERROR_EXIT_CODE |
| 941 except: # pylint: disable=W0702 | 942 except: # pylint: disable=W0702 |
| 942 logging.exception('Unrecognized error occurred.') | 943 logging.exception('Unrecognized error occurred.') |
| 943 return constants.ERROR_EXIT_CODE | 944 return constants.ERROR_EXIT_CODE |
| 944 | 945 |
| 945 | 946 |
| 946 if __name__ == '__main__': | 947 if __name__ == '__main__': |
| 947 sys.exit(main()) | 948 sys.exit(main()) |
| OLD | NEW |