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

Unified Diff: build/android/pylib/device/device_utils.py

Issue 896503002: [Android] Add LogcatMonitor. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 11 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 | « build/android/pylib/device/adb_wrapper.py ('k') | build/android/pylib/device/logcat_monitor.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: build/android/pylib/device/device_utils.py
diff --git a/build/android/pylib/device/device_utils.py b/build/android/pylib/device/device_utils.py
index 805df6517eb6580ebd43d9d2091a8401935709fa..b45d033ad28278b8e5d850a74339bd06e38d5405 100644
--- a/build/android/pylib/device/device_utils.py
+++ b/build/android/pylib/device/device_utils.py
@@ -6,7 +6,7 @@
Eventually, this will be based on adb_wrapper.
"""
-# pylint: disable=W0613
+# pylint: disable=unused-argument
import logging
import multiprocessing
@@ -24,6 +24,7 @@ from pylib.device import adb_wrapper
from pylib.device import decorators
from pylib.device import device_errors
from pylib.device import intent
+from pylib.device import logcat_monitor
from pylib.device.commands import install_commands
from pylib.utils import apk_helper
from pylib.utils import device_temp_file
@@ -1288,6 +1289,19 @@ class DeviceUtils(object):
"""
return self.old_interface.GetMemoryUsageForPid(pid)
+ @decorators.WithTimeoutAndRetriesFromInstance()
+ def GetLogcatMonitor(self, timeout=None, retries=None, *args, **kwargs):
+ """Returns a new LogcatMonitor associated with this device.
+
+ Parameters passed to this function are passed directly to
+ |logcat_monitor.LogcatMonitor| and are documented there.
+
+ Args:
+ timeout: timeout in seconds
+ retries: number of retries
+ """
+ return logcat_monitor.LogcatMonitor(self.adb, *args, **kwargs)
+
def __str__(self):
"""Returns the device serial."""
return self.adb.GetDeviceSerial()
« no previous file with comments | « build/android/pylib/device/adb_wrapper.py ('k') | build/android/pylib/device/logcat_monitor.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698