Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(627)

Side by Side Diff: build/android/test_runner.py

Issue 840393003: Add support for ios_uirobot (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 5 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 83 matching lines...) Expand 10 before | Expand all | Expand 10 after
94 'which the tests are running. [experimental]')) 94 'which the tests are running. [experimental]'))
95 group.add_argument('-e', '--environment', default='local', 95 group.add_argument('-e', '--environment', default='local',
96 choices=constants.VALID_ENVIRONMENTS, 96 choices=constants.VALID_ENVIRONMENTS,
97 help='Test environment to run in (default: %(default)s).') 97 help='Test environment to run in (default: %(default)s).')
98 group.add_argument('--adb-path', 98 group.add_argument('--adb-path',
99 help=('Specify the absolute path of the adb binary that ' 99 help=('Specify the absolute path of the adb binary that '
100 'should be used.')) 100 'should be used.'))
101 group.add_argument('--json-results-file', dest='json_results_file', 101 group.add_argument('--json-results-file', dest='json_results_file',
102 help='If set, will dump results in JSON form ' 102 help='If set, will dump results in JSON form '
103 'to specified file.') 103 'to specified file.')
104 104 group.add_argument('--device-type', default='Android',
jbudorick 2015/01/22 20:34:50 Let's start this in the remote device options for
rnephew (Wrong account) 2015/01/22 21:59:42 Done.
105 choices=constants.VALID_DEVICE_TYPES,
106 help=('Type of device to run on. iOS or android'))
105 107
106 def ProcessCommonOptions(args): 108 def ProcessCommonOptions(args):
107 """Processes and handles all common options.""" 109 """Processes and handles all common options."""
108 run_tests_helper.SetLogLevel(args.verbose_count) 110 run_tests_helper.SetLogLevel(args.verbose_count)
109 constants.SetBuildType(args.build_type) 111 constants.SetBuildType(args.build_type)
110 if args.build_directory: 112 if args.build_directory:
111 constants.SetBuildDirectory(args.build_directory) 113 constants.SetBuildDirectory(args.build_directory)
112 if args.output_directory: 114 if args.output_directory:
113 constants.SetOutputDirectort(args.output_directory) 115 constants.SetOutputDirectort(args.output_directory)
114 if args.adb_path: 116 if args.adb_path:
(...skipping 18 matching lines...) Expand all
133 group.add_argument('--remote-device-os', default='', 135 group.add_argument('--remote-device-os', default='',
134 help='OS to have on the device.') 136 help='OS to have on the device.')
135 group.add_argument('--results-path', default='', 137 group.add_argument('--results-path', default='',
136 help='File path to download results to.') 138 help='File path to download results to.')
137 group.add_argument('--api-protocol', 139 group.add_argument('--api-protocol',
138 help='HTTP protocol to use. (http or https)') 140 help='HTTP protocol to use. (http or https)')
139 group.add_argument('--api-address', help='Address to send HTTP requests.') 141 group.add_argument('--api-address', help='Address to send HTTP requests.')
140 group.add_argument('--api-port', help='Port to send HTTP requests to.') 142 group.add_argument('--api-port', help='Port to send HTTP requests to.')
141 group.add_argument('--runner-type', default='', 143 group.add_argument('--runner-type', default='',
142 help='Type of test to run as.') 144 help='Type of test to run as.')
143 group.add_argument('--runner-package', default='', 145 group.add_argument('--runner-package', help='Package name of test.')
144 help='Package name of test.') 146 group.add_argument('--app-under-test', help='APK to run tests on.')
145 group.add_argument('--app-under-test', default='',
146 help='APK to run tests on.')
147 147
148 api_secret_group = group.add_mutually_exclusive_group() 148 api_secret_group = group.add_mutually_exclusive_group()
149 api_secret_group.add_argument('--api-secret', default='', 149 api_secret_group.add_argument('--api-secret', default='',
150 help='API secret for remote devices.') 150 help='API secret for remote devices.')
151 api_secret_group.add_argument('--api-secret-file', default='', 151 api_secret_group.add_argument('--api-secret-file', default='',
152 help='Path to file that contains API secret.') 152 help='Path to file that contains API secret.')
153 153
154 api_key_group = group.add_mutually_exclusive_group() 154 api_key_group = group.add_mutually_exclusive_group()
155 api_key_group.add_argument('--api-key', default='', 155 api_key_group.add_argument('--api-key', default='',
156 help='API key for remote devices.') 156 help='API key for remote devices.')
(...skipping 832 matching lines...) Expand 10 before | Expand all | Expand 10 after
989 subparser = command_parsers.add_parser( 989 subparser = command_parsers.add_parser(
990 test_type, usage='%(prog)s [options]', help=config.help_txt) 990 test_type, usage='%(prog)s [options]', help=config.help_txt)
991 config.add_options_func(subparser) 991 config.add_options_func(subparser)
992 992
993 args = parser.parse_args() 993 args = parser.parse_args()
994 return RunTestsCommand(args, parser) 994 return RunTestsCommand(args, parser)
995 995
996 996
997 if __name__ == '__main__': 997 if __name__ == '__main__':
998 sys.exit(main()) 998 sys.exit(main())
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698