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 None | 57 return self._test_instance.suite |
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 215 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
283 timeout = v | 283 timeout = v |
284 break | 284 break |
285 else: | 285 else: |
286 logging.warning('Using default 1 minute timeout for %s', test_name) | 286 logging.warning('Using default 1 minute timeout for %s', test_name) |
287 timeout = 60 | 287 timeout = 60 |
288 | 288 |
289 timeout *= cls._GetTimeoutScaleFromAnnotations(annotations) | 289 timeout *= cls._GetTimeoutScaleFromAnnotations(annotations) |
290 | 290 |
291 return timeout | 291 return timeout |
292 | 292 |
OLD | NEW |