| 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 750 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 761 | 761 |
| 762 if args.json_results_file: | 762 if args.json_results_file: |
| 763 json_results.GenerateJsonResultsFile(results, args.json_results_file) | 763 json_results.GenerateJsonResultsFile(results, args.json_results_file) |
| 764 | 764 |
| 765 return exit_code | 765 return exit_code |
| 766 | 766 |
| 767 | 767 |
| 768 def _RunJUnitTests(args): | 768 def _RunJUnitTests(args): |
| 769 """Subcommand of RunTestsCommand which runs junit tests.""" | 769 """Subcommand of RunTestsCommand which runs junit tests.""" |
| 770 runner_factory, tests = junit_setup.Setup(args) | 770 runner_factory, tests = junit_setup.Setup(args) |
| 771 _, exit_code = junit_dispatcher.RunTests(tests, runner_factory) | 771 results, exit_code = junit_dispatcher.RunTests(tests, runner_factory) |
| 772 |
| 773 report_results.LogFull( |
| 774 results=results, |
| 775 test_type='JUnit', |
| 776 test_package=args.test_suite) |
| 777 |
| 772 return exit_code | 778 return exit_code |
| 773 | 779 |
| 774 | 780 |
| 775 def _RunMonkeyTests(args, devices): | 781 def _RunMonkeyTests(args, devices): |
| 776 """Subcommand of RunTestsCommands which runs monkey tests.""" | 782 """Subcommand of RunTestsCommands which runs monkey tests.""" |
| 777 monkey_options = ProcessMonkeyTestOptions(args) | 783 monkey_options = ProcessMonkeyTestOptions(args) |
| 778 | 784 |
| 779 runner_factory, tests = monkey_setup.Setup(monkey_options) | 785 runner_factory, tests = monkey_setup.Setup(monkey_options) |
| 780 | 786 |
| 781 results, exit_code = test_dispatcher.RunTests( | 787 results, exit_code = test_dispatcher.RunTests( |
| (...skipping 241 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1023 return constants.INFRA_EXIT_CODE | 1029 return constants.INFRA_EXIT_CODE |
| 1024 else: | 1030 else: |
| 1025 return constants.ERROR_EXIT_CODE | 1031 return constants.ERROR_EXIT_CODE |
| 1026 except: # pylint: disable=W0702 | 1032 except: # pylint: disable=W0702 |
| 1027 logging.exception('Unrecognized error occurred.') | 1033 logging.exception('Unrecognized error occurred.') |
| 1028 return constants.ERROR_EXIT_CODE | 1034 return constants.ERROR_EXIT_CODE |
| 1029 | 1035 |
| 1030 | 1036 |
| 1031 if __name__ == '__main__': | 1037 if __name__ == '__main__': |
| 1032 sys.exit(main()) | 1038 sys.exit(main()) |
| OLD | NEW |