| 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 443 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 454 help='Filters tests by runner class. Must be fully qualified.') | 454 help='Filters tests by runner class. Must be fully qualified.') |
| 455 parser.add_argument( | 455 parser.add_argument( |
| 456 '-f', '--test-filter', | 456 '-f', '--test-filter', |
| 457 dest='test_filter', | 457 dest='test_filter', |
| 458 help='Filters tests googletest-style.') | 458 help='Filters tests googletest-style.') |
| 459 parser.add_argument( | 459 parser.add_argument( |
| 460 '-s', '--test-suite', | 460 '-s', '--test-suite', |
| 461 dest='test_suite', required=True, | 461 dest='test_suite', required=True, |
| 462 help='JUnit test suite to run.') | 462 help='JUnit test suite to run.') |
| 463 | 463 |
| 464 # These arguments are for Android Robolectric tests. |
| 465 parser.add_argument( |
| 466 '--android-manifest-path', |
| 467 help='Path to Android Manifest to configure Robolectric.') |
| 468 parser.add_argument( |
| 469 '--package-name', |
| 470 help='Default package name for Robolectric tests.') |
| 471 parser.add_argument( |
| 472 '--resource-dir', |
| 473 help='Path to resource dir to configure Robolectric.') |
| 474 parser.add_argument( |
| 475 '--robolectric-runtime-deps-dir', |
| 476 help='Path to runtime deps for Robolectric.') |
| 477 |
| 464 | 478 |
| 465 def AddLinkerTestOptions(parser): | 479 def AddLinkerTestOptions(parser): |
| 466 | 480 |
| 467 parser.add_argument_group('linker arguments') | 481 parser.add_argument_group('linker arguments') |
| 468 | 482 |
| 469 parser.add_argument( | 483 parser.add_argument( |
| 470 '-f', '--gtest-filter', | 484 '-f', '--gtest-filter', |
| 471 dest='test_filter', | 485 dest='test_filter', |
| 472 help='googletest-style filter string.') | 486 help='googletest-style filter string.') |
| 473 parser.add_argument( | 487 parser.add_argument( |
| (...skipping 412 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 886 if e.is_infra_error: | 900 if e.is_infra_error: |
| 887 return constants.INFRA_EXIT_CODE | 901 return constants.INFRA_EXIT_CODE |
| 888 return constants.ERROR_EXIT_CODE | 902 return constants.ERROR_EXIT_CODE |
| 889 except: # pylint: disable=W0702 | 903 except: # pylint: disable=W0702 |
| 890 logging.exception('Unrecognized error occurred.') | 904 logging.exception('Unrecognized error occurred.') |
| 891 return constants.ERROR_EXIT_CODE | 905 return constants.ERROR_EXIT_CODE |
| 892 | 906 |
| 893 | 907 |
| 894 if __name__ == '__main__': | 908 if __name__ == '__main__': |
| 895 sys.exit(main()) | 909 sys.exit(main()) |
| OLD | NEW |