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 187 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
198 if not str(device) in self._flag_changers: | 198 if not str(device) in self._flag_changers: |
199 self._flag_changers[str(device)] = flag_changer.FlagChanger( | 199 self._flag_changers[str(device)] = flag_changer.FlagChanger( |
200 device, self._test_instance.package_info.cmdline_file) | 200 device, self._test_instance.package_info.cmdline_file) |
201 | 201 |
202 #override | 202 #override |
203 def _CreateShards(self, tests): | 203 def _CreateShards(self, tests): |
204 return tests | 204 return tests |
205 | 205 |
206 #override | 206 #override |
207 def _GetTests(self): | 207 def _GetTests(self): |
208 return self._test_instance.GetTests() | 208 tests = self._test_instance.GetTests() |
| 209 tests = self._ApplyExternalSharding( |
| 210 tests, self._test_instance.external_shard_index, |
| 211 self._test_instance.total_external_shards) |
| 212 return tests |
209 | 213 |
210 #override | 214 #override |
211 def _GetUniqueTestName(self, test): | 215 def _GetUniqueTestName(self, test): |
212 return instrumentation_test_instance.GetUniqueTestName(test) | 216 return instrumentation_test_instance.GetUniqueTestName(test) |
213 | 217 |
214 #override | 218 #override |
215 def _RunTest(self, device, test): | 219 def _RunTest(self, device, test): |
216 extras = {} | 220 extras = {} |
217 | 221 |
218 flags = None | 222 flags = None |
(...skipping 206 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
425 timeout = v | 429 timeout = v |
426 break | 430 break |
427 else: | 431 else: |
428 logging.warning('Using default 1 minute timeout for %s', test_name) | 432 logging.warning('Using default 1 minute timeout for %s', test_name) |
429 timeout = 60 | 433 timeout = 60 |
430 | 434 |
431 timeout *= cls._GetTimeoutScaleFromAnnotations(annotations) | 435 timeout *= cls._GetTimeoutScaleFromAnnotations(annotations) |
432 | 436 |
433 return timeout | 437 return timeout |
434 | 438 |
OLD | NEW |