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 319 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
330 '-A', '--annotation', dest='annotation_str', | 330 '-A', '--annotation', dest='annotation_str', |
331 help=('Comma-separated list of annotations. Run only tests with any of ' | 331 help=('Comma-separated list of annotations. Run only tests with any of ' |
332 'the given annotations. An annotation can be either a key or a ' | 332 'the given annotations. An annotation can be either a key or a ' |
333 'key-values pair. A test that has no annotation is considered ' | 333 'key-values pair. A test that has no annotation is considered ' |
334 '"SmallTest".')) | 334 '"SmallTest".')) |
335 argument_group.add_argument( | 335 argument_group.add_argument( |
336 '-E', '--exclude-annotation', dest='exclude_annotation_str', | 336 '-E', '--exclude-annotation', dest='exclude_annotation_str', |
337 help=('Comma-separated list of annotations. Exclude tests with these ' | 337 help=('Comma-separated list of annotations. Exclude tests with these ' |
338 'annotations.')) | 338 'annotations.')) |
339 argument_group.add_argument( | 339 argument_group.add_argument( |
340 '--screenshot-directory', dest='screenshot_dir', | 340 '--screenshot', dest='screenshot_failures', action='store_true', |
341 help='Capture screenshots of test failures') | 341 help='Capture screenshots of test failures') |
342 argument_group.add_argument( | 342 argument_group.add_argument( |
343 '--save-perf-json', action='store_true', | 343 '--save-perf-json', action='store_true', |
344 help='Saves the JSON file for each UI Perf test.') | 344 help='Saves the JSON file for each UI Perf test.') |
345 argument_group.add_argument( | 345 argument_group.add_argument( |
346 '--official-build', action='store_true', help='Run official build tests.') | 346 '--official-build', action='store_true', help='Run official build tests.') |
347 argument_group.add_argument( | 347 argument_group.add_argument( |
348 '--test_data', '--test-data', action='append', default=[], | 348 '--test_data', '--test-data', action='append', default=[], |
349 help=('Each instance defines a directory of test data that should be ' | 349 help=('Each instance defines a directory of test data that should be ' |
350 'copied to the target(s) before running the tests. The argument ' | 350 'copied to the target(s) before running the tests. The argument ' |
(...skipping 612 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
963 if e.is_infra_error: | 963 if e.is_infra_error: |
964 return constants.INFRA_EXIT_CODE | 964 return constants.INFRA_EXIT_CODE |
965 return constants.ERROR_EXIT_CODE | 965 return constants.ERROR_EXIT_CODE |
966 except: # pylint: disable=W0702 | 966 except: # pylint: disable=W0702 |
967 logging.exception('Unrecognized error occurred.') | 967 logging.exception('Unrecognized error occurred.') |
968 return constants.ERROR_EXIT_CODE | 968 return constants.ERROR_EXIT_CODE |
969 | 969 |
970 | 970 |
971 if __name__ == '__main__': | 971 if __name__ == '__main__': |
972 sys.exit(main()) | 972 sys.exit(main()) |
OLD | NEW |