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

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

Issue 647013002: [Android] Reland of 'Add zip pushing and refine push mode selection.' (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 2 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 | « build/android/gyp/push_libraries.py ('k') | build/android/pylib/device/commands/__init__.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 # 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 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
65 # running at all. 65 # running at all.
66 device.KillAll('adb_reboot', blocking=True, timeout=2, retries=0) 66 device.KillAll('adb_reboot', blocking=True, timeout=2, retries=0)
67 except device_errors.CommandFailedError: 67 except device_errors.CommandFailedError:
68 # We can safely ignore the exception because we don't expect adb_reboot 68 # We can safely ignore the exception because we don't expect adb_reboot
69 # to be running. 69 # to be running.
70 pass 70 pass
71 # Push adb_reboot 71 # Push adb_reboot
72 logging.info(' Pushing adb_reboot ...') 72 logging.info(' Pushing adb_reboot ...')
73 adb_reboot = os.path.join(constants.DIR_SOURCE_ROOT, 73 adb_reboot = os.path.join(constants.DIR_SOURCE_ROOT,
74 'out/%s/adb_reboot' % target) 74 'out/%s/adb_reboot' % target)
75 device.PushChangedFiles(adb_reboot, '/data/local/tmp/') 75 device.PushChangedFiles([(adb_reboot, '/data/local/tmp/')])
76 # Launch adb_reboot 76 # Launch adb_reboot
77 logging.info(' Launching adb_reboot ...') 77 logging.info(' Launching adb_reboot ...')
78 device.old_interface.GetAndroidToolStatusAndOutput( 78 device.old_interface.GetAndroidToolStatusAndOutput(
79 '/data/local/tmp/adb_reboot') 79 '/data/local/tmp/adb_reboot')
80 80
81 81
82 def _ConfigureLocalProperties(device, is_perf): 82 def _ConfigureLocalProperties(device, is_perf):
83 """Set standard readonly testing device properties prior to reboot.""" 83 """Set standard readonly testing device properties prior to reboot."""
84 local_props = [ 84 local_props = [
85 'persist.sys.usb.config=adb', 85 'persist.sys.usb.config=adb',
(...skipping 163 matching lines...) Expand 10 before | Expand all | Expand 10 after
249 249
250 if args: 250 if args:
251 print >> sys.stderr, 'Unused args %s' % args 251 print >> sys.stderr, 'Unused args %s' % args
252 return 1 252 return 1
253 253
254 return ProvisionDevices(options) 254 return ProvisionDevices(options)
255 255
256 256
257 if __name__ == '__main__': 257 if __name__ == '__main__':
258 sys.exit(main(sys.argv)) 258 sys.exit(main(sys.argv))
OLDNEW
« no previous file with comments | « build/android/gyp/push_libraries.py ('k') | build/android/pylib/device/commands/__init__.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698