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

Side by Side Diff: build/android/pylib/remote/device/remote_device_gtest_run.py

Issue 1277943002: [Android] Detect when remote service loses contact with device. (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 | build/android/pylib/remote/device/remote_device_test_run.py » ('j') | 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 logging 7 import logging
8 import os 8 import os
9 import re 9 import re
10 import tempfile 10 import tempfile
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
75 if self._env.only_output_failures: 75 if self._env.only_output_failures:
76 logging.info('See logcat for more results information.') 76 logging.info('See logcat for more results information.')
77 if not self._results['results']['pass']: 77 if not self._results['results']['pass']:
78 if any(_NATIVE_CRASH_RE.search(l) 78 if any(_NATIVE_CRASH_RE.search(l)
79 for l in self._results['results']['output'].splitlines()): 79 for l in self._results['results']['output'].splitlines()):
80 logging.critical('Native crash detected. Printing Logcat.') 80 logging.critical('Native crash detected. Printing Logcat.')
81 self._LogLogcat() 81 self._LogLogcat()
82 results.AddResult(base_test_result.BaseTestResult( 82 results.AddResult(base_test_result.BaseTestResult(
83 'Remote Service detected native crash.', 83 'Remote Service detected native crash.',
84 base_test_result.ResultType.CRASH)) 84 base_test_result.ResultType.CRASH))
85 elif self._DidDeviceGoOffline():
86 self._LogLogcat()
jbudorick 2015/08/10 18:07:05 Again, I think we want to get to a state where we
87 self._LogAdbTraceLog()
88 raise remote_device_helper.RemoteDeviceError(
89 'Remote service unable to reach device.', is_infra_error=True)
85 else: 90 else:
86 results.AddResult(base_test_result.BaseTestResult( 91 results.AddResult(base_test_result.BaseTestResult(
87 'Remote Service detected error.', 92 'Remote Service detected error.',
88 base_test_result.ResultType.UNKNOWN)) 93 base_test_result.ResultType.UNKNOWN))
89 94
90 return results 95 return results
OLDNEW
« no previous file with comments | « no previous file | build/android/pylib/remote/device/remote_device_test_run.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698