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

Unified Diff: build/android/buildbot/bb_device_status_check.py

Issue 1129003003: [Android] Make device_status_check handle single-device failures. (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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: build/android/buildbot/bb_device_status_check.py
diff --git a/build/android/buildbot/bb_device_status_check.py b/build/android/buildbot/bb_device_status_check.py
index 8690a60a71409f3df38a6ce6a6a9ad384b9d2498..50dd8103bbd95b75293c4a4ec48e211bfaa3df9e 100755
--- a/build/android/buildbot/bb_device_status_check.py
+++ b/build/android/buildbot/bb_device_status_check.py
@@ -52,21 +52,28 @@ def DeviceInfo(serial, options):
device = device_utils.DeviceUtils(serial)
battery = battery_utils.BatteryUtils(device)
- battery_info = {}
+ build_product = ''
+ build_id = ''
battery_level = 100
errors = []
dev_good = True
- json_data = {
- 'serial': serial,
- 'type': device.build_product,
- 'build': device.build_id,
- 'build_detail': device.GetProp('ro.build.fingerprint'),
- 'battery': {},
- 'imei_slice': 'Unknown',
- 'wifi_ip': device.GetProp('dhcp.wlan0.ipaddress'),
- }
+ json_data = {}
try:
+ build_product = device.build_product
+ build_id = device.build_id
+
+ json_data = {
+ 'serial': serial,
+ 'type': build_product,
+ 'build': build_id,
+ 'build_detail': device.GetProp('ro.build.fingerprint'),
+ 'battery': {},
+ 'imei_slice': 'Unknown',
+ 'wifi_ip': device.GetProp('dhcp.wlan0.ipaddress'),
+ }
+
+ battery_info = {}
try:
battery_info = battery.GetBatteryInfo(timeout=5)
battery_level = int(battery_info.get('level', battery_level))
@@ -103,8 +110,7 @@ def DeviceInfo(serial, options):
logging.exception('Timeout while getting device status.')
dev_good = False
- return (device.build_product, device.build_id, battery_level, errors,
- dev_good, json_data)
+ return (build_product, build_id, battery_level, errors, dev_good, json_data)
def CheckForMissingDevices(options, adb_online_devs):
« 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