Chromium Code Reviews| 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() | |
|
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 |
| OLD | NEW |