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

Unified Diff: build/android/provision_devices.py

Issue 1141793003: Update from https://crrev.com/329939 (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 7 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « build/android/gyp/write_ordered_libraries.py ('k') | build/android/pylib/base/base_setup.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: build/android/provision_devices.py
diff --git a/build/android/provision_devices.py b/build/android/provision_devices.py
index ee52c7163750e49d65a1759184b39fd75528540a..b366f0c14cdfc6e02f8c00c07ef29aeb998a8dd3 100755
--- a/build/android/provision_devices.py
+++ b/build/android/provision_devices.py
@@ -184,6 +184,12 @@ def SetProperties(device, options):
except device_errors.CommandFailedError as e:
logging.exception('Unable to charge device to specified level.')
+ if options.max_battery_temp is not None:
+ try:
+ battery = battery_utils.BatteryUtils(device)
+ battery.LetBatteryCoolToTemperature(options.max_battery_temp)
+ except device_errors.CommandFailedError as e:
+ logging.exception('Unable to let battery cool to specified temperature.')
def _ConfigureLocalProperties(device, java_debug=True):
"""Set standard readonly testing device properties prior to reboot."""
@@ -241,7 +247,7 @@ def _PushAndLaunchAdbReboot(device, target):
# Launch adb_reboot
logging.info(' Launching adb_reboot ...')
device.RunShellCommand(
- [device.GetDevicePieWrapper(), '/data/local/tmp/adb_reboot'],
+ ['/data/local/tmp/adb_reboot'],
check_return=True)
@@ -308,6 +314,8 @@ def main():
help='list of adb keys to push to device')
parser.add_argument('-v', '--verbose', action='count', default=1,
help='Log more information.')
+ parser.add_argument('--max-battery-temp', type=int, metavar='NUM',
+ help='Wait for the battery to have this temp or lower.')
args = parser.parse_args()
constants.SetBuildType(args.target)
« no previous file with comments | « build/android/gyp/write_ordered_libraries.py ('k') | build/android/pylib/base/base_setup.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698