summaryrefslogtreecommitdiff
path: root/automated/android
diff options
context:
space:
mode:
authorChase Qi <chase.qi@linaro.org>2017-08-24 10:14:33 +0800
committerChase Qi <chase.qi@linaro.org>2017-08-24 10:14:33 +0800
commit4f25e5a7071614fe56f5282c72a368f7808a0256 (patch)
treee93363522fb735bdf14ec745e9e79aecd14966de /automated/android
parent35f8f45b0f42bdd011e2809cc45bad86573e22e1 (diff)
android: print USB bus and device info for adb debugging
Print USB bus and device info for the following 3 conditions. * Before adb initialization * After 'adb root' command executed * When adb connectivity issue detected Change-Id: Id7ad9bf1238e5f55e3752680d0ae90bcd2c9b3d6 Signed-off-by: Chase Qi <chase.qi@linaro.org>
Diffstat (limited to 'automated/android')
-rwxr-xr-xautomated/android/tradefed/setup.sh2
-rwxr-xr-xautomated/android/tradefed/tradefed-runner.py5
2 files changed, 6 insertions, 1 deletions
diff --git a/automated/android/tradefed/setup.sh b/automated/android/tradefed/setup.sh
index 5887ab7..82dd0f0 100755
--- a/automated/android/tradefed/setup.sh
+++ b/automated/android/tradefed/setup.sh
@@ -6,7 +6,7 @@
. ../../lib/android-test-lib
JDK="openjdk-8-jdk-headless"
-PKG_DEPS="curl wget zip xz-utils python-lxml python-setuptools python-pexpect aapt lib32z1-dev libc6-dev-i386 lib32gcc1 libc6:i386 libstdc++6:i386 libgcc1:i386 zlib1g:i386 libncurses5:i386 python-dev python-protobuf protobuf-compiler python-virtualenv python-pip python-pexpect"
+PKG_DEPS="usbutils curl wget zip xz-utils python-lxml python-setuptools python-pexpect aapt lib32z1-dev libc6-dev-i386 lib32gcc1 libc6:i386 libstdc++6:i386 libgcc1:i386 zlib1g:i386 libncurses5:i386 python-dev python-protobuf protobuf-compiler python-virtualenv python-pip python-pexpect"
dist_name
case "${dist}" in
diff --git a/automated/android/tradefed/tradefed-runner.py b/automated/android/tradefed/tradefed-runner.py
index c6e78e7..52884f9 100755
--- a/automated/android/tradefed/tradefed-runner.py
+++ b/automated/android/tradefed/tradefed-runner.py
@@ -164,6 +164,11 @@ while child.isalive():
adb_command = "adb shell echo OK"
adb_check = subprocess.Popen(shlex.split(adb_command))
if adb_check.wait() != 0:
+ logger.debug('"find /dev/bus/usb" output')
+ subprocess.call(['find', '/dev/bus/usb'])
+ logger.debug('"lsusb" output')
+ subprocess.call('lsusb')
+ logger.debug('"adb devices" output')
subprocess.call(['adb', 'devices'])
logger.error('adb connection lost!! Will wait for 5 minutes and terminating tradefed shell test as adb connection is lost!')
time.sleep(300)