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 os | 6 import os |
7 import posixpath | 7 import posixpath |
8 import re | 8 import re |
9 import time | 9 import time |
10 | 10 |
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
52 _CURRENT_FOCUS_CRASH_RE = re.compile( | 52 _CURRENT_FOCUS_CRASH_RE = re.compile( |
53 r'\s*mCurrentFocus.*Application (Error|Not Responding): (\S+)}') | 53 r'\s*mCurrentFocus.*Application (Error|Not Responding): (\S+)}') |
54 | 54 |
55 | 55 |
56 class LocalDeviceInstrumentationTestRun( | 56 class LocalDeviceInstrumentationTestRun( |
57 local_device_test_run.LocalDeviceTestRun): | 57 local_device_test_run.LocalDeviceTestRun): |
58 def __init__(self, env, test_instance): | 58 def __init__(self, env, test_instance): |
59 super(LocalDeviceInstrumentationTestRun, self).__init__(env, test_instance) | 59 super(LocalDeviceInstrumentationTestRun, self).__init__(env, test_instance) |
60 self._flag_changers = {} | 60 self._flag_changers = {} |
61 | 61 |
| 62 #override |
62 def TestPackage(self): | 63 def TestPackage(self): |
63 return self._test_instance.suite | 64 return self._test_instance.suite |
64 | 65 |
65 #override | 66 #override |
66 def SetUp(self): | 67 def SetUp(self): |
67 def substitute_device_root(d, device_root): | 68 def substitute_device_root(d, device_root): |
68 if not d: | 69 if not d: |
69 return device_root | 70 return device_root |
70 elif isinstance(d, list): | 71 elif isinstance(d, list): |
71 return posixpath.join(*(p if p else device_root for p in d)) | 72 return posixpath.join(*(p if p else device_root for p in d)) |
(...skipping 310 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
382 timeout = v | 383 timeout = v |
383 break | 384 break |
384 else: | 385 else: |
385 logging.warning('Using default 1 minute timeout for %s', test_name) | 386 logging.warning('Using default 1 minute timeout for %s', test_name) |
386 timeout = 60 | 387 timeout = 60 |
387 | 388 |
388 timeout *= cls._GetTimeoutScaleFromAnnotations(annotations) | 389 timeout *= cls._GetTimeoutScaleFromAnnotations(annotations) |
389 | 390 |
390 return timeout | 391 return timeout |
391 | 392 |
OLD | NEW |