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

Unified Diff: build/android/pylib/remote/device/remote_device_test_run.py

Issue 1311783005: [Android] Improve error messaging for amp failures. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 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/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..30d5a0d6b6771b4756c64fc9e98afd1506ef91e7 100644
--- a/build/android/pylib/remote/device/remote_device_test_run.py
+++ b/build/android/pylib/remote/device/remote_device_test_run.py
@@ -23,8 +23,8 @@ from pylib.remote.device import remote_device_helper
from pylib.utils import zip_utils
_DEVICE_OFFLINE_RE = re.compile('error: device not found')
-_LONG_MSG_RE = re.compile('longMsg=')
-_SHORT_MSG_RE = re.compile('shortMsg=')
+_LONG_MSG_RE = re.compile('longMsg=(.*)$')
+_SHORT_MSG_RE = re.compile('shortMsg=(.*)$')
class RemoteDeviceTestRun(test_run.TestRun):
@@ -366,24 +366,27 @@ class RemoteDeviceTestRun(test_run.TestRun):
def _DetectPlatformErrors(self, results):
if not self._results['results']['pass']:
- if any(_SHORT_MSG_RE.search(l)
- for l in self._results['results']['output'].splitlines()):
+ crash_msg = None
+ for line in self._results['results']['output'].splitlines():
+ m = _LONG_MSG_RE.search(line)
+ if m:
+ crash_msg = m.group(1)
+ break
+ m = _SHORT_MSG_RE.search(line)
+ if m:
+ crash_msg = m.group(1)
+ if crash_msg:
self._LogLogcat()
- for line in self._results['results']['output'].splitlines():
- if _LONG_MSG_RE.search(line):
- results.AddResult(base_test_result.BaseTestResult(
- line.split('=')[1], base_test_result.ResultType.CRASH))
- break
- else:
- results.AddResult(base_test_result.BaseTestResult(
- 'Unknown platform error detected.',
- base_test_result.ResultType.UNKNOWN))
+ results.AddResult(base_test_result.BaseTestResult(
+ crash_msg, 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))
« 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