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 pylib import flag_changer | 10 from pylib import flag_changer |
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
128 display_name = self._GetTestName(test) | 128 display_name = self._GetTestName(test) |
129 flags = test['flags'] | 129 flags = test['flags'] |
130 if flags.add: | 130 if flags.add: |
131 display_name = '%s with {%s}' % (display_name, ' '.join(flags.add)) | 131 display_name = '%s with {%s}' % (display_name, ' '.join(flags.add)) |
132 if flags.remove: | 132 if flags.remove: |
133 display_name = '%s without {%s}' % (display_name, ' '.join(flags.remove)) | 133 display_name = '%s without {%s}' % (display_name, ' '.join(flags.remove)) |
134 return display_name | 134 return display_name |
135 | 135 |
136 #override | 136 #override |
137 def _RunTest(self, device, test): | 137 def _RunTest(self, device, test): |
138 extras = self._test_instance.GetHttpServerEnvironmentVars() | 138 extras = {} |
139 | 139 |
140 flags = None | 140 flags = None |
141 test_timeout_scale = None | 141 test_timeout_scale = None |
142 if isinstance(test, list): | 142 if isinstance(test, list): |
143 if not self._test_instance.driver_apk: | 143 if not self._test_instance.driver_apk: |
144 raise Exception('driver_apk does not exist. ' | 144 raise Exception('driver_apk does not exist. ' |
145 'Please build it and try again.') | 145 'Please build it and try again.') |
146 | 146 |
147 def name_and_timeout(t): | 147 def name_and_timeout(t): |
148 n = self._GetTestName(t) | 148 n = self._GetTestName(t) |
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
239 timeout = v | 239 timeout = v |
240 break | 240 break |
241 else: | 241 else: |
242 logging.warning('Using default 1 minute timeout for %s', test_name) | 242 logging.warning('Using default 1 minute timeout for %s', test_name) |
243 timeout = 60 | 243 timeout = 60 |
244 | 244 |
245 timeout *= cls._GetTimeoutScaleFromAnnotations(annotations) | 245 timeout *= cls._GetTimeoutScaleFromAnnotations(annotations) |
246 | 246 |
247 return timeout | 247 return timeout |
248 | 248 |
OLD | NEW |