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

Unified Diff: build/android/provision_devices.py

Issue 773793002: Make battery level an option for android provision devices. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Review Created 6 years 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 | no next file » | 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 0dc8c817dce6432fc87257b73794bb528e788c1b..c719754bffa49b697dc88f9bda29ab26ea3c52ce 100755
--- a/build/android/provision_devices.py
+++ b/build/android/provision_devices.py
@@ -179,7 +179,7 @@ def ProvisionDevice(device, options, is_perf):
logging.error('Unable to obtain battery info for %s, %s',
str(device), e)
- while int(battery_info.get('level', 100)) < 95:
+ while int(battery_info.get('level', 100)) < options.min_battery_level:
if not device.old_interface.IsDeviceCharging():
if device.old_interface.CanControlUsbCharging():
device.old_interface.EnableUsbCharging()
@@ -237,6 +237,9 @@ def main(argv):
logging.getLogger().setLevel(logging.INFO)
parser = optparse.OptionParser()
+ parser.add_option('--min-battery-level', default=95, type='int',
+ help="Minimum battery level for performance testing "
+ "(default: 95).")
parser.add_option('--skip-wipe', action='store_true', default=False,
help="Don't wipe device data during provisioning.")
parser.add_option('--disable-location', action='store_true', default=False,
« 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