Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 # Copyright 2015 The Chromium Authors. All rights reserved. | 1 # Copyright 2015 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 import logging | 5 import logging |
| 6 import re | 6 import re |
| 7 import time | 7 import time |
| 8 | 8 |
| 9 from devil.android import device_errors | 9 from devil.android import device_errors |
| 10 from devil.android import flag_changer | 10 from devil.android import flag_changer |
| (...skipping 250 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 261 r.SetType(base_test_result.ResultType.CRASH) | 261 r.SetType(base_test_result.ResultType.CRASH) |
| 262 | 262 |
| 263 if any(r.GetType() not in (base_test_result.ResultType.PASS, | 263 if any(r.GetType() not in (base_test_result.ResultType.PASS, |
| 264 base_test_result.ResultType.SKIP) | 264 base_test_result.ResultType.SKIP) |
| 265 for r in results): | 265 for r in results): |
| 266 logging.info('detected failure in %s. raw output:', test_display_name) | 266 logging.info('detected failure in %s. raw output:', test_display_name) |
| 267 for l in output: | 267 for l in output: |
| 268 logging.info(' %s', l) | 268 logging.info(' %s', l) |
| 269 if (not self._env.skip_clear_data | 269 if (not self._env.skip_clear_data |
| 270 and self._test_instance.package_info): | 270 and self._test_instance.package_info): |
| 271 device.ClearApplicationState(self._test_instance.package_info.package) | 271 permissions = ( |
| 272 self._test_instance.apk_under_test | |
|
jbudorick
2016/05/10 23:23:29
I think this is backwards.
rnephew (Reviews Here)
2016/05/10 23:27:33
Done.
| |
| 273 if self._test_instance.apk_under_test.GetPermissions() | |
| 274 else None) | |
| 275 device.ClearApplicationState(self._test_instance.package_info.package, | |
| 276 permissions=permissions) | |
| 277 | |
| 272 else: | 278 else: |
| 273 logging.debug('raw output from %s:', test_display_name) | 279 logging.debug('raw output from %s:', test_display_name) |
| 274 for l in output: | 280 for l in output: |
| 275 logging.debug(' %s', l) | 281 logging.debug(' %s', l) |
| 276 | 282 |
| 277 return results | 283 return results |
| 278 | 284 |
| 279 #override | 285 #override |
| 280 def _ShouldShard(self): | 286 def _ShouldShard(self): |
| 281 return True | 287 return True |
| (...skipping 13 matching lines...) Expand all Loading... | |
| 295 timeout = v | 301 timeout = v |
| 296 break | 302 break |
| 297 else: | 303 else: |
| 298 logging.warning('Using default 1 minute timeout for %s', test_name) | 304 logging.warning('Using default 1 minute timeout for %s', test_name) |
| 299 timeout = 60 | 305 timeout = 60 |
| 300 | 306 |
| 301 timeout *= cls._GetTimeoutScaleFromAnnotations(annotations) | 307 timeout *= cls._GetTimeoutScaleFromAnnotations(annotations) |
| 302 | 308 |
| 303 return timeout | 309 return timeout |
| 304 | 310 |
| OLD | NEW |