| 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 """Environment setup and teardown for remote devices.""" | 5 """Environment setup and teardown for remote devices.""" |
| 6 | 6 |
| 7 import distutils.version | 7 import distutils.version |
| 8 import json | 8 import json |
| 9 import logging | 9 import logging |
| 10 import os | 10 import os |
| 11 import random | 11 import random |
| 12 import sys | 12 import sys |
| 13 | 13 |
| 14 from devil.utils import reraiser_thread |
| 15 from devil.utils import timeout_retry |
| 14 from pylib import constants | 16 from pylib import constants |
| 15 from pylib.base import environment | 17 from pylib.base import environment |
| 16 from pylib.remote.device import appurify_sanitized | 18 from pylib.remote.device import appurify_sanitized |
| 17 from pylib.remote.device import remote_device_helper | 19 from pylib.remote.device import remote_device_helper |
| 18 from pylib.utils import timeout_retry | |
| 19 from pylib.utils import reraiser_thread | |
| 20 | 20 |
| 21 class RemoteDeviceEnvironment(environment.Environment): | 21 class RemoteDeviceEnvironment(environment.Environment): |
| 22 """An environment for running on remote devices.""" | 22 """An environment for running on remote devices.""" |
| 23 | 23 |
| 24 _ENV_KEY = 'env' | 24 _ENV_KEY = 'env' |
| 25 _DEVICE_KEY = 'device' | 25 _DEVICE_KEY = 'device' |
| 26 _DEFAULT_RETRIES = 0 | 26 _DEFAULT_RETRIES = 0 |
| 27 | 27 |
| 28 def __init__(self, args, error_func): | 28 def __init__(self, args, error_func): |
| 29 """Constructor. | 29 """Constructor. |
| (...skipping 329 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 359 def trigger(self): | 359 def trigger(self): |
| 360 return self._trigger | 360 return self._trigger |
| 361 | 361 |
| 362 @property | 362 @property |
| 363 def verbose_count(self): | 363 def verbose_count(self): |
| 364 return self._verbose_count | 364 return self._verbose_count |
| 365 | 365 |
| 366 @property | 366 @property |
| 367 def device_type(self): | 367 def device_type(self): |
| 368 return self._device_type | 368 return self._device_type |
| OLD | NEW |