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

Unified Diff: build/android/device_status_check.py

Issue 14652029: Alert on zero online devices when last devices file is missing or empty. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix ilevy's nit Created 7 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/device_status_check.py
diff --git a/build/android/device_status_check.py b/build/android/device_status_check.py
index 642e4eeb2a841aec9f503ac35b4aa1abea15caa1..15ab4938e6d45fc81f669e1b8f04395e553e0779 100755
--- a/build/android/device_status_check.py
+++ b/build/android/device_status_check.py
@@ -107,9 +107,14 @@ def CheckForMissingDevices(options, adb_online_devs):
last_devices = ReadDeviceList('.last_devices')
missing_devs = list(set(last_devices) - set(adb_online_devs))
- WriteDeviceList('.last_devices', (adb_online_devs + last_devices))
+ all_known_devices = list(set(adb_online_devs) | set(last_devices))
+ WriteDeviceList('.last_devices', all_known_devices)
WriteDeviceList('.last_missing', missing_devs)
+ if not all_known_devices:
+ # This can happen if for some reason the .last_devices file is not
+ # present or if it was empty.
+ return ['No online devices. Have any devices been plugged in?']
if missing_devs:
devices_missing_msg = '%d devices not detected.' % len(missing_devs)
buildbot_report.PrintSummaryText(devices_missing_msg)
« 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