diff options
author | navabi@chromium.org <navabi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-10-04 03:44:04 +0000 |
---|---|---|
committer | navabi@chromium.org <navabi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-10-04 03:44:04 +0000 |
commit | a12371f1085c5b2f9f04ee71e410611a5f5870e8 (patch) | |
tree | 9180da8d99c623353a5d7b2afeda1338350f571a /build | |
parent | 0288c4627966ded883cf47d5045a8f40cc1cc7c0 (diff) | |
download | chromium_src-a12371f1085c5b2f9f04ee71e410611a5f5870e8.zip chromium_src-a12371f1085c5b2f9f04ee71e410611a5f5870e8.tar.gz chromium_src-a12371f1085c5b2f9f04ee71e410611a5f5870e8.tar.bz2 |
Add code to debug difference between adb devices checks.
We are getting emails that do not detect all available devices when checked, but
when the list of connected devices is printed, it shows all devices. This will
give us extra information to debug.
BUG=
Review URL: https://chromiumcodereview.appspot.com/11060017
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@160066 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'build')
-rwxr-xr-x | build/android/device_status_check.py | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/build/android/device_status_check.py b/build/android/device_status_check.py index 50d8e8b..3d695a2 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 |