diff options
author | navabi@google.com <navabi@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-05-06 23:37:19 +0000 |
---|---|---|
committer | navabi@google.com <navabi@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-05-06 23:37:19 +0000 |
commit | 0b3befd367b7a879d14e29faf13231a9e9da987e (patch) | |
tree | 39ea9eada8e644c36f2eff13a485f0f51d9b96bb /build | |
parent | e00ff14bcb13a8e415c9bc0e288c822b8cd0ded1 (diff) | |
download | chromium_src-0b3befd367b7a879d14e29faf13231a9e9da987e.zip chromium_src-0b3befd367b7a879d14e29faf13231a9e9da987e.tar.gz chromium_src-0b3befd367b7a879d14e29faf13231a9e9da987e.tar.bz2 |
Print all the battery info from dumpsys battery from devices.
The output (and indentation) will look like this:
Device 01cb95182214a4b6 (mako)
Build: KOT49H (google/occam/mako:4.4.2/KOT49H/937116:userdebug/dev-keys)
Current Battery Service state:
AC powered: false
USB powered: true
Wireless powered: false
status: 2
health: 2
present: true
level: 24
scale: 100
voltage: 3872
current now: -311500
temperature: 288
technology: Li-ion
IMEI slice: 819914
Wifi IP:
BUG=
Review URL: https://codereview.chromium.org/251673004
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@268638 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'build')
-rwxr-xr-x | build/android/buildbot/bb_device_status_check.py | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/build/android/buildbot/bb_device_status_check.py b/build/android/buildbot/bb_device_status_check.py index f9998f4..94c741f 100755 --- a/build/android/buildbot/bb_device_status_check.py +++ b/build/android/buildbot/bb_device_status_check.py @@ -65,16 +65,13 @@ def DeviceInfo(serial, options): ac_power = _GetData('AC powered: (\w+)', battery) battery_level = _GetData('level: (\d+)', battery) - battery_temp = _GetData('temperature: (\d+)', battery, - lambda x: float(x) / 10.0) imei_slice = _GetData('Device ID = (\d+)', device_adb.old_interface.GetSubscriberInfo(), lambda x: x[-6:]) report = ['Device %s (%s)' % (serial, device_type), ' Build: %s (%s)' % (device_build, device_adb.old_interface.GetBuildFingerprint()), - ' Battery: %s%%' % battery_level, - ' Battery temp: %s' % battery_temp, + ' %s' % '\n '.join(battery.split('\n')), ' IMEI slice: %s' % imei_slice, ' Wifi IP: %s' % device_adb.old_interface.GetWifiIP(), ''] |