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

Unified Diff: telemetry/telemetry/internal/platform/android_platform_backend.py

Issue 2447583002: [devil] Work around occasionally fatal `adb forward --list` bug. (Closed)
Patch Set: remove extra line Created 4 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
Index: telemetry/telemetry/internal/platform/android_platform_backend.py
diff --git a/telemetry/telemetry/internal/platform/android_platform_backend.py b/telemetry/telemetry/internal/platform/android_platform_backend.py
index 524bc61d7364fb57d4517f82ee85d22636bde027..e6831339f74b139eb1999442a48a29954c40a04b 100644
--- a/telemetry/telemetry/internal/platform/android_platform_backend.py
+++ b/telemetry/telemetry/internal/platform/android_platform_backend.py
@@ -494,22 +494,10 @@ class AndroidPlatformBackend(
self._device.adb.Forward('tcp:%d' % host_port, device_port)
def StopForwardingHost(self, host_port):
- adb_forward_list = self._device.adb.ForwardList().strip().splitlines()
- for line in adb_forward_list:
- line = line.split(' ')
- if len(line) >= 2:
- if line[0] == self._device and line[1] == 'tcp:%s' % host_port:
- self._device.adb.ForwardRemove('tcp:%d' % host_port)
- break
- else:
- logging.warning('ADB forwarder list output format unexpected. Expected '
- 'format "<device id> tcp:<host port> but got:\n%s',
- line)
- logging.warning('Complete output from ADB forwarder list:\n%s',
- '\n'.join(adb_forward_list))
- else:
- logging.warning('Port %s not found in adb forward --list for device %s',
- host_port, self._device)
+ # This used to run `adb forward --list` to check that the requested
+ # port was actually being forwarded to self._device. Unfortunately,
+ # starting in adb 1.0.36, a bug (b/31811775) keeps this from working.
nednguyen 2016/10/24 12:05:50 same here
jbudorick 2016/10/24 13:46:16 I don't mind removing it from here if you'd prefer
+ self._device.adb.ForwardRemove('tcp:%d' % host_port)
def DismissCrashDialogIfNeeded(self):
"""Dismiss any error dialogs.
« devil/devil/android/sdk/adb_wrapper.py ('K') | « devil/devil/android/sdk/adb_wrapper.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698