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

Unified Diff: build/android/provision_devices.py

Issue 1126143004: [Android] Add option to wait for battery temperature to device provisioning (Closed) Base URL: https://chromium.googlesource.com/chromium/src.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 | « no previous file | build/android/pylib/device/battery_utils.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..dbb329752cb429f493bea3c4a994fc7c256729ef 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."""
@@ -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 | « no previous file | build/android/pylib/device/battery_utils.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698