OLD | NEW |
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 Loading... |
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 |
OLD | NEW |