Index: build/android/pylib/remote/device/remote_device_test_run.py |
diff --git a/build/android/pylib/remote/device/remote_device_test_run.py b/build/android/pylib/remote/device/remote_device_test_run.py |
index b82b06a4e5225b68ba98ef00632217731be71091..33f590fcc696ba1b7b99b196ce9dfad343fc95b3 100644 |
--- a/build/android/pylib/remote/device/remote_device_test_run.py |
+++ b/build/android/pylib/remote/device/remote_device_test_run.py |
@@ -370,20 +370,24 @@ class RemoteDeviceTestRun(test_run.TestRun): |
for l in self._results['results']['output'].splitlines()): |
self._LogLogcat() |
for line in self._results['results']['output'].splitlines(): |
+ if _SHORT_MSG_RE.search(line): |
mikecase (-- gone --)
2015/08/24 19:53:32
My one comment is that you have the line ...
rnephew (Reviews Here)
2015/08/24 20:32:51
Lets let John chime in and see which he likes bett
jbudorick
2015/09/08 18:21:02
I think both are doing too much looping & regex se
rnephew (Reviews Here)
2015/09/08 19:05:17
Done.
|
+ short_msg = line |
if _LONG_MSG_RE.search(line): |
results.AddResult(base_test_result.BaseTestResult( |
line.split('=')[1], base_test_result.ResultType.CRASH)) |
break |
else: |
+ # Long message not found, use short message. |
results.AddResult(base_test_result.BaseTestResult( |
- 'Unknown platform error detected.', |
- base_test_result.ResultType.UNKNOWN)) |
+ short_msg.split('=')[1], base_test_result.ResultType.CRASH)) |
elif self._DidDeviceGoOffline(): |
self._LogLogcat() |
self._LogAdbTraceLog() |
raise remote_device_helper.RemoteDeviceError( |
'Remote service unable to reach device.', is_infra_error=True) |
else: |
- results.AddResult(base_test_result.BaseTestResult( |
- 'Remote Service detected error.', |
- base_test_result.ResultType.UNKNOWN)) |
+ # Remote service is reporting a failure, but no failure in results obj. |
+ if results.DidRunPass(): |
+ results.AddResult(base_test_result.BaseTestResult( |
+ 'Remote Service detected error.', |
+ base_test_result.ResultType.UNKNOWN)) |