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

Side by Side Diff: scripts/slave/telemetry.py

Issue 302743002: Cleanup: Remove the remaining instance of ChromiumTestShell from Telemetry scripts. (Closed) Base URL: https://chromium.googlesource.com/chromium/tools/build.git@master
Patch Set: Corrected the .expected file to resolve test failures! Created 6 years, 6 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
« no previous file with comments | « no previous file | scripts/slave/unittests/telemetry_test.py » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 #! /usr/bin/env python 1 #! /usr/bin/env python
2 # Copyright (c) 2012 The Chromium Authors. All rights reserved. 2 # Copyright (c) 2012 The Chromium Authors. All rights reserved.
3 # Use of this source code is governed by a BSD-style license that can be 3 # Use of this source code is governed by a BSD-style license that can be
4 # found in the LICENSE file. 4 # found in the LICENSE file.
5 5
6 """Set up and invoke telemetry tests.""" 6 """Set up and invoke telemetry tests."""
7 7
8 import json 8 import json
9 import optparse 9 import optparse
10 import os 10 import os
(...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after
149 149
150 return commands, env 150 return commands, env
151 151
152 152
153 def main(argv): 153 def main(argv):
154 prog_desc = 'Invoke telemetry performance tests.' 154 prog_desc = 'Invoke telemetry performance tests.'
155 parser = optparse.OptionParser(usage=('%prog [options]' + '\n\n' + prog_desc)) 155 parser = optparse.OptionParser(usage=('%prog [options]' + '\n\n' + prog_desc))
156 parser.add_option('--print-cmd', action='store_true', 156 parser.add_option('--print-cmd', action='store_true',
157 help='only print command instead of running it') 157 help='only print command instead of running it')
158 parser.add_option('--target-android-browser', 158 parser.add_option('--target-android-browser',
159 default='android-chromium-testshell', 159 default='android-chrome-shell',
160 help='target browser used on Android') 160 help='target browser used on Android')
161 parser.add_option('--factory-properties', action='callback', 161 parser.add_option('--factory-properties', action='callback',
162 callback=chromium_utils.convert_json, type='string', 162 callback=chromium_utils.convert_json, type='string',
163 nargs=1, default={}, 163 nargs=1, default={},
164 help='factory properties in JSON format') 164 help='factory properties in JSON format')
165 165
166 options, _ = parser.parse_args(argv[1:]) 166 options, _ = parser.parse_args(argv[1:])
167 if not options.factory_properties: 167 if not options.factory_properties:
168 print 'This program requires a factory properties to run.' 168 print 'This program requires a factory properties to run.'
169 return 1 169 return 1
170 170
171 commands, env = _GenerateTelemetryCommandSequence(options) 171 commands, env = _GenerateTelemetryCommandSequence(options)
172 172
173 retval = 0 173 retval = 0
174 for command in commands: 174 for command in commands:
175 if options.print_cmd: 175 if options.print_cmd:
176 print ' '.join("'%s'" % c for c in command) 176 print ' '.join("'%s'" % c for c in command)
177 continue 177 continue
178 178
179 retval = chromium_utils.RunCommand(command, env=env) 179 retval = chromium_utils.RunCommand(command, env=env)
180 if retval != 0: 180 if retval != 0:
181 break 181 break
182 return retval 182 return retval
183 183
184 184
185 if '__main__' == __name__: 185 if '__main__' == __name__:
186 sys.exit(main(sys.argv)) 186 sys.exit(main(sys.argv))
OLDNEW
« no previous file with comments | « no previous file | scripts/slave/unittests/telemetry_test.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698