Chromium Code Reviews| 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 6c00b7087dc9f5c44aeabdc2ca2abe8a17c0174c..94a51428d394aef7829e8eef7cfdfba551c354b9 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 |
| @@ -263,8 +263,13 @@ class LocalDeviceInstrumentationTestRun( |
| check_return=True) |
| time_ms = lambda: int(time.time() * 1e3) |
| start_ms = time_ms() |
| - output = device.StartInstrumentation( |
| - target, raw=True, extras=extras, timeout=timeout, retries=0) |
| + logcat = '' |
| + with device.GetLogcatMonitor() as logmon: |
| + output = device.StartInstrumentation( |
| + target, raw=True, extras=extras, timeout=timeout, retries=0) |
| + for logstring in logmon.FindAll(r'.*'): |
|
jbudorick
2016/10/25 02:17:35
There are a couple of better options for dumping t
BigBossZhiling
2016/10/25 22:08:44
Done.
|
| + logcat += logstring.group(0) + '\n' |
| + logmon.Close() |
| finally: |
| device.RunShellCommand( |
| ['log', '-p', 'i', '-t', _TAG, 'END %s' % test_name], |
| @@ -281,7 +286,7 @@ class LocalDeviceInstrumentationTestRun( |
| result_code, result_bundle, statuses = ( |
| self._test_instance.ParseAmInstrumentRawOutput(output)) |
| results = self._test_instance.GenerateTestResults( |
| - result_code, result_bundle, statuses, start_ms, duration_ms) |
| + result_code, result_bundle, statuses, start_ms, duration_ms, logcat) |
| # Update the result name if the test used flags. |
| if flags: |