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

Side by Side 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, 4 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 unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # Copyright 2014 The Chromium Authors. All rights reserved. 1 # Copyright 2014 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be 2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file. 3 # found in the LICENSE file.
4 4
5 """Run specific test on specific environment.""" 5 """Run specific test on specific environment."""
6 6
7 import json 7 import json
8 import logging 8 import logging
9 import os 9 import os
10 import re 10 import re
(...skipping 352 matching lines...) Expand 10 before | Expand all | Expand 10 after
363 if any(_DEVICE_OFFLINE_RE.search(l) for l in adb_trace_log.splitlines()): 363 if any(_DEVICE_OFFLINE_RE.search(l) for l in adb_trace_log.splitlines()):
364 return True 364 return True
365 return False 365 return False
366 366
367 def _DetectPlatformErrors(self, results): 367 def _DetectPlatformErrors(self, results):
368 if not self._results['results']['pass']: 368 if not self._results['results']['pass']:
369 if any(_SHORT_MSG_RE.search(l) 369 if any(_SHORT_MSG_RE.search(l)
370 for l in self._results['results']['output'].splitlines()): 370 for l in self._results['results']['output'].splitlines()):
371 self._LogLogcat() 371 self._LogLogcat()
372 for line in self._results['results']['output'].splitlines(): 372 for line in self._results['results']['output'].splitlines():
373 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.
374 short_msg = line
373 if _LONG_MSG_RE.search(line): 375 if _LONG_MSG_RE.search(line):
374 results.AddResult(base_test_result.BaseTestResult( 376 results.AddResult(base_test_result.BaseTestResult(
375 line.split('=')[1], base_test_result.ResultType.CRASH)) 377 line.split('=')[1], base_test_result.ResultType.CRASH))
376 break 378 break
377 else: 379 else:
380 # Long message not found, use short message.
378 results.AddResult(base_test_result.BaseTestResult( 381 results.AddResult(base_test_result.BaseTestResult(
379 'Unknown platform error detected.', 382 short_msg.split('=')[1], base_test_result.ResultType.CRASH))
380 base_test_result.ResultType.UNKNOWN))
381 elif self._DidDeviceGoOffline(): 383 elif self._DidDeviceGoOffline():
382 self._LogLogcat() 384 self._LogLogcat()
383 self._LogAdbTraceLog() 385 self._LogAdbTraceLog()
384 raise remote_device_helper.RemoteDeviceError( 386 raise remote_device_helper.RemoteDeviceError(
385 'Remote service unable to reach device.', is_infra_error=True) 387 'Remote service unable to reach device.', is_infra_error=True)
386 else: 388 else:
387 results.AddResult(base_test_result.BaseTestResult( 389 # Remote service is reporting a failure, but no failure in results obj.
388 'Remote Service detected error.', 390 if results.DidRunPass():
389 base_test_result.ResultType.UNKNOWN)) 391 results.AddResult(base_test_result.BaseTestResult(
392 'Remote Service detected error.',
393 base_test_result.ResultType.UNKNOWN))
OLDNEW
« 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