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

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
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()
87 raise remote_device_helper.RemoteDeviceError(
88 'Remote service unable to reach device.', is_infra_error=True)
85 else: 89 else:
86 results.AddResult(base_test_result.BaseTestResult( 90 results.AddResult(base_test_result.BaseTestResult(
87 'Remote Service detected error.', 91 'Remote Service detected error.',
88 base_test_result.ResultType.UNKNOWN)) 92 base_test_result.ResultType.UNKNOWN))
89 93
90 return results 94 return results
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698