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 111 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
122 display_name = self._GetTestName(test) | 122 display_name = self._GetTestName(test) |
123 flags = test['flags'] | 123 flags = test['flags'] |
124 if flags.add: | 124 if flags.add: |
125 display_name = '%s with {%s}' % (display_name, ' '.join(flags.add)) | 125 display_name = '%s with {%s}' % (display_name, ' '.join(flags.add)) |
126 if flags.remove: | 126 if flags.remove: |
127 display_name = '%s without {%s}' % (display_name, ' '.join(flags.remove)) | 127 display_name = '%s without {%s}' % (display_name, ' '.join(flags.remove)) |
128 return display_name | 128 return display_name |
129 | 129 |
130 #override | 130 #override |
131 def _RunTest(self, device, test): | 131 def _RunTest(self, device, test): |
132 extras = self._test_instance.GetHttpServerEnvironmentVars() | 132 extras = {} |
133 | 133 |
134 flags = None | 134 flags = None |
135 if isinstance(test, list): | 135 if isinstance(test, list): |
136 if not self._test_instance.driver_apk: | 136 if not self._test_instance.driver_apk: |
137 raise Exception('driver_apk does not exist. ' | 137 raise Exception('driver_apk does not exist. ' |
138 'Please build it and try again.') | 138 'Please build it and try again.') |
139 | 139 |
140 def name_and_timeout(t): | 140 def name_and_timeout(t): |
141 n = self._GetTestName(t) | 141 n = self._GetTestName(t) |
142 i = self._GetTimeoutFromAnnotations(t['annotations'], n) | 142 i = self._GetTimeoutFromAnnotations(t['annotations'], n) |
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
220 | 220 |
221 try: | 221 try: |
222 scale = int(annotations.get('TimeoutScale', 1)) | 222 scale = int(annotations.get('TimeoutScale', 1)) |
223 except ValueError as e: | 223 except ValueError as e: |
224 logging.warning("Non-integer value of TimeoutScale ignored. (%s)", str(e)) | 224 logging.warning("Non-integer value of TimeoutScale ignored. (%s)", str(e)) |
225 scale = 1 | 225 scale = 1 |
226 timeout *= scale | 226 timeout *= scale |
227 | 227 |
228 return timeout | 228 return timeout |
229 | 229 |
OLD | NEW |