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

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

Issue 2385673005: [Android] Log instr test start & end. (Closed)
Patch Set: Created 4 years, 3 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: build/android/pylib/local/device/local_device_instrumentation_test_run.py
diff --git a/build/android/pylib/local/device/local_device_instrumentation_test_run.py b/build/android/pylib/local/device/local_device_instrumentation_test_run.py
index 5f5f409ab544bc5c707999c4e962648396a68389..a472f45fa32488e4baf66ba3a1816ab2bf2d3abc 100644
--- a/build/android/pylib/local/device/local_device_instrumentation_test_run.py
+++ b/build/android/pylib/local/device/local_device_instrumentation_test_run.py
@@ -255,12 +255,22 @@ class LocalDeviceInstrumentationTestRun(
add=flags.add, remove=flags.remove)
try:
+ device.RunShellCommand(
+ ['log', '-p', 'i', '-t',
+ self._test_instance.test_package.split('.')[-1],
mikecase (-- gone --) 2016/10/01 01:04:38 is this tag just the word "tests"? Like "org.chro
jbudorick 2016/10/04 21:54:25 Clearly wasn't thinking this through all the way.
+ 'START %s' % test_name],
+ check_return=True)
mikecase (-- gone --) 2016/10/01 01:04:38 So there will be two logs indicating the start of
jbudorick 2016/10/04 21:54:25 Correct.
time_ms = lambda: int(time.time() * 1e3)
start_ms = time_ms()
output = device.StartInstrumentation(
target, raw=True, extras=extras, timeout=timeout, retries=0)
- duration_ms = time_ms() - start_ms
finally:
+ device.RunShellCommand(
+ ['log', '-p', 'i', '-t',
+ self._test_instance.test_package.split('.')[-1],
+ 'END %s' % test_name],
+ check_return=True)
+ duration_ms = time_ms() - start_ms
if flags:
self._flag_changers[str(device)].Restore()
if test_timeout_scale:
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698