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

Unified Diff: build/android/device_status_check.py

Issue 11060017: Add code to debug difference between adb devices checks. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 2 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 50d8e8b24ba6aae01e912fcba49d4a4d01b77e29..3d695a2235fe17176f1e0c5d136adbb64edb3223 100755
--- a/build/android/device_status_check.py
+++ b/build/android/device_status_check.py
@@ -5,7 +5,7 @@
# found in the LICENSE file.
"""A class to keep track of devices across builds and report state."""
-
+import logging
import optparse
import os
import smtplib
@@ -59,6 +59,11 @@ def CheckForMissingDevices(options, adb_online_devs):
adb_online_devs: A list of serial numbers of the currently visible
and online attached devices.
"""
+ # TODO(navabi): remove this once the bug that causes different number
+ # of devices to be detected between calls is fixed.
+ logger = logging.getLogger()
+ logger.setLevel(logging.INFO)
+
out_dir = os.path.abspath(options.out_dir)
def ReadDeviceList(file_name):
@@ -97,12 +102,15 @@ def CheckForMissingDevices(options, adb_online_devs):
devices_missing_msg = '%d devices not detected.' % len(missing_devs)
buildbot_report.PrintSummaryText(devices_missing_msg)
+ # TODO(navabi): Debug by printing both output from GetCmdOutput and
+ # GetAttachedDevices to compare results.
body = '\n'.join(
['Current online devices: %s' % adb_online_devs,
'%s are no longer visible. Were they removed?\n' % missing_devs,
'SHERIFF: See go/chrome_device_monitor',
'Cache file: %s\n\n' % last_devices_path,
- 'adb devices: %s' % GetCmdOutput(['adb', 'devices'])])
+ 'adb devices: %s' % GetCmdOutput(['adb', 'devices']),
+ 'adb devices(GetAttachedDevices): %s' % GetAttachedDevices()])
print body
« 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