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

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

Issue 1415533007: [Android] Add sharding for AMP instrumentation tests. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 1 month 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 108 matching lines...) Expand 10 before | Expand all | Expand 10 after
119 119
120 def AddRemoteDeviceOptions(parser): 120 def AddRemoteDeviceOptions(parser):
121 group = parser.add_argument_group('Remote Device Options') 121 group = parser.add_argument_group('Remote Device Options')
122 122
123 group.add_argument('--trigger', 123 group.add_argument('--trigger',
124 help=('Only triggers the test if set. Stores test_run_id ' 124 help=('Only triggers the test if set. Stores test_run_id '
125 'in given file path. ')) 125 'in given file path. '))
126 group.add_argument('--collect', 126 group.add_argument('--collect',
127 help=('Only collects the test results if set. ' 127 help=('Only collects the test results if set. '
128 'Gets test_run_id from given file path.')) 128 'Gets test_run_id from given file path.'))
129 group.add_argument('--num-shards', type=int,
130 help='Number of devices to shard the test across.')
129 group.add_argument('--remote-device', action='append', 131 group.add_argument('--remote-device', action='append',
130 help='Device type to run test on.') 132 help='Device type to run test on.')
131 group.add_argument('--results-path', 133 group.add_argument('--results-path',
132 help='File path to download results to.') 134 help='DEPRECATED File path to download results to.')
rnephew (Reviews Here) 2015/10/26 20:42:18 So is there no way to now specify if you want to d
jbudorick 2015/10/26 22:23:30 Agreed. I don't think this should be deprecated.
mikecase (-- gone --) 2015/10/27 01:27:43 Well, now when you shard you are going to get num_
133 group.add_argument('--api-protocol', 135 group.add_argument('--api-protocol',
134 help='HTTP protocol to use. (http or https)') 136 help='HTTP protocol to use. (http or https)')
135 group.add_argument('--api-address', 137 group.add_argument('--api-address',
136 help='Address to send HTTP requests.') 138 help='Address to send HTTP requests.')
137 group.add_argument('--api-port', 139 group.add_argument('--api-port',
138 help='Port to send HTTP requests to.') 140 help='Port to send HTTP requests to.')
139 group.add_argument('--runner-type', 141 group.add_argument('--test-framework',
140 help='Type of test to run as.') 142 help='Test framework to run test.')
141 group.add_argument('--runner-package', 143 group.add_argument('--runner-package',
142 help='Package name of test.') 144 help='Package name of test.')
143 group.add_argument('--device-type', 145 group.add_argument('--device-type',
144 choices=constants.VALID_DEVICE_TYPES, 146 choices=constants.VALID_DEVICE_TYPES,
145 help=('Type of device to run on. iOS or android')) 147 help=('Type of device to run on. iOS or android'))
146 group.add_argument('--device-oem', action='append', 148 group.add_argument('--device-oem', action='append',
147 help='Device OEM to run on.') 149 help='Device OEM to run on.')
148 group.add_argument('--remote-device-file', 150 group.add_argument('--remote-device-file',
149 help=('File with JSON to select remote device. ' 151 help=('File with JSON to select remote device. '
150 'Overrides all other flags.')) 152 'Overrides all other flags.'))
(...skipping 847 matching lines...) Expand 10 before | Expand all | Expand 10 after
998 if e.is_infra_error: 1000 if e.is_infra_error:
999 return constants.INFRA_EXIT_CODE 1001 return constants.INFRA_EXIT_CODE
1000 return constants.ERROR_EXIT_CODE 1002 return constants.ERROR_EXIT_CODE
1001 except: # pylint: disable=W0702 1003 except: # pylint: disable=W0702
1002 logging.exception('Unrecognized error occurred.') 1004 logging.exception('Unrecognized error occurred.')
1003 return constants.ERROR_EXIT_CODE 1005 return constants.ERROR_EXIT_CODE
1004 1006
1005 1007
1006 if __name__ == '__main__': 1008 if __name__ == '__main__':
1007 sys.exit(main()) 1009 sys.exit(main())
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698