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

Unified Diff: tools/telemetry/telemetry/internal/platform/android_device.py

Issue 1501843002: [Android] Use more specific host platforms for devil. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: better handling of the no adb case Created 5 years 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 | « build/android/test_runner.py ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/telemetry/telemetry/internal/platform/android_device.py
diff --git a/tools/telemetry/telemetry/internal/platform/android_device.py b/tools/telemetry/telemetry/internal/platform/android_device.py
index 9b629895e286c8ec07d32a521b774ee2cb3f4fe4..cd3a929d52fe0ef16bc6cf7d862ba9022d7098e0 100644
--- a/tools/telemetry/telemetry/internal/platform/android_device.py
+++ b/tools/telemetry/telemetry/internal/platform/android_device.py
@@ -13,7 +13,7 @@ from telemetry.internal.platform.profiler import monsoon
from devil.android import device_blacklist
from devil.android import device_errors
from devil.android import device_utils
-from pylib import constants
+from devil.android.sdk import adb_wrapper
class AndroidDevice(device.Device):
@@ -132,9 +132,14 @@ def CanDiscoverDevices():
if os.name != 'posix':
return False
- adb_path = constants.GetAdbPath()
+ try:
+ adb_path = adb_wrapper.AdbWrapper.GetAdbPath()
+ except device_errors.NoAdbError:
+ return False
+
if os.path.isabs(adb_path) and not os.path.exists(adb_path):
return False
+
try:
with open(os.devnull, 'w') as devnull:
adb_process = subprocess.Popen(
« no previous file with comments | « build/android/test_runner.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698