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 641 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
652 | 652 |
653 report_results.LogFull( | 653 report_results.LogFull( |
654 results=results, | 654 results=results, |
655 test_type='Unit test', | 655 test_type='Unit test', |
656 test_package=suite_name, | 656 test_package=suite_name, |
657 flakiness_server=args.flakiness_dashboard_server) | 657 flakiness_server=args.flakiness_dashboard_server) |
658 | 658 |
659 if args.json_results_file: | 659 if args.json_results_file: |
660 json_results.GenerateJsonResultsFile(results, args.json_results_file) | 660 json_results.GenerateJsonResultsFile(results, args.json_results_file) |
661 | 661 |
662 if os.path.isdir(constants.ISOLATE_DEPS_DIR): | |
663 shutil.rmtree(constants.ISOLATE_DEPS_DIR) | |
664 | |
665 return exit_code | 662 return exit_code |
666 | 663 |
667 | 664 |
668 def _RunLinkerTests(args, devices): | 665 def _RunLinkerTests(args, devices): |
669 """Subcommand of RunTestsCommands which runs linker tests.""" | 666 """Subcommand of RunTestsCommands which runs linker tests.""" |
670 runner_factory, tests = linker_setup.Setup(args, devices) | 667 runner_factory, tests = linker_setup.Setup(args, devices) |
671 | 668 |
672 results, exit_code = test_dispatcher.RunTests( | 669 results, exit_code = test_dispatcher.RunTests( |
673 tests, runner_factory, devices, shard=True, test_timeout=60, | 670 tests, runner_factory, devices, shard=True, test_timeout=60, |
674 num_retries=args.num_retries) | 671 num_retries=args.num_retries) |
(...skipping 356 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1031 return constants.INFRA_EXIT_CODE | 1028 return constants.INFRA_EXIT_CODE |
1032 else: | 1029 else: |
1033 return constants.ERROR_EXIT_CODE | 1030 return constants.ERROR_EXIT_CODE |
1034 except: # pylint: disable=W0702 | 1031 except: # pylint: disable=W0702 |
1035 logging.exception('Unrecognized error occurred.') | 1032 logging.exception('Unrecognized error occurred.') |
1036 return constants.ERROR_EXIT_CODE | 1033 return constants.ERROR_EXIT_CODE |
1037 | 1034 |
1038 | 1035 |
1039 if __name__ == '__main__': | 1036 if __name__ == '__main__': |
1040 sys.exit(main()) | 1037 sys.exit(main()) |
OLD | NEW |