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

Unified Diff: build/android/pylib/local/device/local_device_environment.py

Issue 2163833003: Logdog for logcats (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address comments cont. Created 4 years, 5 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: build/android/pylib/local/device/local_device_environment.py
diff --git a/build/android/pylib/local/device/local_device_environment.py b/build/android/pylib/local/device/local_device_environment.py
index 431614377efa68bd4cffecc6158f13d0d6673965..b7eafa726c0a9553198c7d505394519df963907c 100644
--- a/build/android/pylib/local/device/local_device_environment.py
+++ b/build/android/pylib/local/device/local_device_environment.py
@@ -16,6 +16,7 @@ from devil.android import device_errors
from devil.android import device_list
from devil.android import device_utils
from devil.android import logcat_monitor
+from devil.utils import cmd_helper
from devil.utils import file_utils
from devil.utils import parallelizer
from pylib import constants
@@ -188,6 +189,11 @@ class LocalDeviceEnvironment(environment.Environment):
try:
m.Stop()
m.Close()
+ add_device_cmd = ['sed', '-i', '-e',
jbudorick 2016/07/29 00:52:39 Can you do this in-process rather than calling out
nicholaslin 2016/07/29 20:50:19 Done.
+ 's/^/device({0}) /'.
+ format(m.adb.GetDeviceSerial()),
+ m.output_file]
+ cmd_helper.RunCmd(add_device_cmd)
except base_error.BaseError:
logging.exception('Failed to stop logcat monitor for %s',
m.adb.GetDeviceSerial())

Powered by Google App Engine
This is Rietveld 408576698