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

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

Issue 327573003: Reboot device after configuring in provision script. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | 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 # 2 #
3 # Copyright (c) 2013 The Chromium Authors. All rights reserved. 3 # Copyright (c) 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 """Provisions Android devices with settings required for bots. 7 """Provisions Android devices with settings required for bots.
8 8
9 Usage: 9 Usage:
10 ./provision_devices.py [-d <device serial number>] 10 ./provision_devices.py [-d <device serial number>]
(...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after
139 device.old_interface.EnableAdbRoot() 139 device.old_interface.EnableAdbRoot()
140 _ConfigureLocalProperties(device) 140 _ConfigureLocalProperties(device)
141 device_settings.ConfigureContentSettingsDict( 141 device_settings.ConfigureContentSettingsDict(
142 device, device_settings.DETERMINISTIC_DEVICE_SETTINGS) 142 device, device_settings.DETERMINISTIC_DEVICE_SETTINGS)
143 # TODO(tonyg): We eventually want network on. However, currently radios 143 # TODO(tonyg): We eventually want network on. However, currently radios
144 # can cause perfbots to drain faster than they charge. 144 # can cause perfbots to drain faster than they charge.
145 if 'perf' in os.environ.get('BUILDBOT_BUILDERNAME', '').lower(): 145 if 'perf' in os.environ.get('BUILDBOT_BUILDERNAME', '').lower():
146 device_settings.ConfigureContentSettingsDict( 146 device_settings.ConfigureContentSettingsDict(
147 device, device_settings.NETWORK_DISABLED_SETTINGS) 147 device, device_settings.NETWORK_DISABLED_SETTINGS)
148 device.old_interface.RunShellCommandWithSU('date -u %f' % time.time()) 148 device.old_interface.RunShellCommandWithSU('date -u %f' % time.time())
149 try:
jbudorick 2014/06/09 20:57:15 Can you add a TODO for me to parallelize this afte
navabi 2014/06/09 22:56:18 Done.
150 (device_utils.DeviceUtils.parallel(devices)
151 .old_interface.Reboot(True))
tonyg 2014/06/09 20:56:29 Nit: I think this and the above copy can fit on a
navabi 2014/06/09 22:56:18 Done.
152 except errors.DeviceUnresponsiveError:
153 pass
154 for device_serial in devices:
155 device = device_utils.DeviceUtils(device_serial)
156 device.WaitUntilFullyBooted(timeout=90)
149 (_, props) = device.old_interface.GetShellCommandStatusAndOutput('getprop') 157 (_, props) = device.old_interface.GetShellCommandStatusAndOutput('getprop')
150 for prop in props: 158 for prop in props:
151 print prop 159 print prop
152 if options.auto_reconnect: 160 if options.auto_reconnect:
153 PushAndLaunchAdbReboot(devices, options.target) 161 PushAndLaunchAdbReboot(devices, options.target)
154 162
155 163
156 def main(argv): 164 def main(argv):
157 logging.basicConfig(level=logging.INFO) 165 logging.basicConfig(level=logging.INFO)
158 166
(...skipping 22 matching lines...) Expand all
181 (device_utils.DeviceUtils.parallel(devices) 189 (device_utils.DeviceUtils.parallel(devices)
182 .old_interface.Reboot(True).pFinish(None)) 190 .old_interface.Reboot(True).pFinish(None))
183 except errors.DeviceUnresponsiveError: 191 except errors.DeviceUnresponsiveError:
184 pass 192 pass
185 else: 193 else:
186 ProvisionDevices(options) 194 ProvisionDevices(options)
187 195
188 196
189 if __name__ == '__main__': 197 if __name__ == '__main__':
190 sys.exit(main(sys.argv)) 198 sys.exit(main(sys.argv))
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698