| 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 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 47 r'\s*mCurrentFocus.*Application (Error|Not Responding): (\S+)}') | 47 r'\s*mCurrentFocus.*Application (Error|Not Responding): (\S+)}') |
| 48 | 48 |
| 49 | 49 |
| 50 class LocalDeviceInstrumentationTestRun( | 50 class LocalDeviceInstrumentationTestRun( |
| 51 local_device_test_run.LocalDeviceTestRun): | 51 local_device_test_run.LocalDeviceTestRun): |
| 52 def __init__(self, env, test_instance): | 52 def __init__(self, env, test_instance): |
| 53 super(LocalDeviceInstrumentationTestRun, self).__init__(env, test_instance) | 53 super(LocalDeviceInstrumentationTestRun, self).__init__(env, test_instance) |
| 54 self._flag_changers = {} | 54 self._flag_changers = {} |
| 55 | 55 |
| 56 def TestPackage(self): | 56 def TestPackage(self): |
| 57 return self._test_instance.suite | 57 return None |
| 58 | 58 |
| 59 def SetUp(self): | 59 def SetUp(self): |
| 60 def substitute_external_storage(d, external_storage): | 60 def substitute_external_storage(d, external_storage): |
| 61 if not d: | 61 if not d: |
| 62 return external_storage | 62 return external_storage |
| 63 elif isinstance(d, list): | 63 elif isinstance(d, list): |
| 64 return '/'.join(p if p else external_storage for p in d) | 64 return '/'.join(p if p else external_storage for p in d) |
| 65 else: | 65 else: |
| 66 return d | 66 return d |
| 67 | 67 |
| (...skipping 200 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 268 timeout = v | 268 timeout = v |
| 269 break | 269 break |
| 270 else: | 270 else: |
| 271 logging.warning('Using default 1 minute timeout for %s', test_name) | 271 logging.warning('Using default 1 minute timeout for %s', test_name) |
| 272 timeout = 60 | 272 timeout = 60 |
| 273 | 273 |
| 274 timeout *= cls._GetTimeoutScaleFromAnnotations(annotations) | 274 timeout *= cls._GetTimeoutScaleFromAnnotations(annotations) |
| 275 | 275 |
| 276 return timeout | 276 return timeout |
| 277 | 277 |
| OLD | NEW |