| 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 794 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 805 | 805 |
| 806 Raises: | 806 Raises: |
| 807 Exception: Unknown command name passed in, or an exception from an | 807 Exception: Unknown command name passed in, or an exception from an |
| 808 individual test runner. | 808 individual test runner. |
| 809 """ | 809 """ |
| 810 command = args.command | 810 command = args.command |
| 811 | 811 |
| 812 ProcessCommonOptions(args) | 812 ProcessCommonOptions(args) |
| 813 | 813 |
| 814 if args.enable_platform_mode: | 814 if args.enable_platform_mode: |
| 815 return RunTestsInPlatformMode(args, parser.error) | 815 return RunTestsInPlatformMode(args, parser) |
| 816 | 816 |
| 817 if command in constants.LOCAL_MACHINE_TESTS: | 817 if command in constants.LOCAL_MACHINE_TESTS: |
| 818 devices = [] | 818 devices = [] |
| 819 else: | 819 else: |
| 820 devices = _GetAttachedDevices(args.test_device) | 820 devices = _GetAttachedDevices(args.test_device) |
| 821 | 821 |
| 822 forwarder.Forwarder.RemoveHostLog() | 822 forwarder.Forwarder.RemoveHostLog() |
| 823 if not ports.ResetTestServerPortAllocation(): | 823 if not ports.ResetTestServerPortAllocation(): |
| 824 raise Exception('Failed to reset test server port.') | 824 raise Exception('Failed to reset test server port.') |
| 825 | 825 |
| (...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 922 subparser = command_parsers.add_parser( | 922 subparser = command_parsers.add_parser( |
| 923 test_type, usage='%(prog)s [options]', help=config.help_txt) | 923 test_type, usage='%(prog)s [options]', help=config.help_txt) |
| 924 config.add_options_func(subparser) | 924 config.add_options_func(subparser) |
| 925 | 925 |
| 926 args = parser.parse_args() | 926 args = parser.parse_args() |
| 927 return RunTestsCommand(args, parser) | 927 return RunTestsCommand(args, parser) |
| 928 | 928 |
| 929 | 929 |
| 930 if __name__ == '__main__': | 930 if __name__ == '__main__': |
| 931 sys.exit(main()) | 931 sys.exit(main()) |
| OLD | NEW |