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 contextlib | 5 import contextlib |
6 import logging | 6 import logging |
7 import os | 7 import os |
8 import posixpath | 8 import posixpath |
9 import re | 9 import re |
10 import sys | 10 import sys |
(...skipping 286 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
297 if not str(device) in self._flag_changers: | 297 if not str(device) in self._flag_changers: |
298 self._flag_changers[str(device)] = flag_changer.FlagChanger( | 298 self._flag_changers[str(device)] = flag_changer.FlagChanger( |
299 device, self._test_instance.package_info.cmdline_file) | 299 device, self._test_instance.package_info.cmdline_file) |
300 | 300 |
301 #override | 301 #override |
302 def _CreateShards(self, tests): | 302 def _CreateShards(self, tests): |
303 return tests | 303 return tests |
304 | 304 |
305 #override | 305 #override |
306 def _GetTests(self): | 306 def _GetTests(self): |
307 tests = self._test_instance.GetTests() | 307 device = self._env.devices[0] |
| 308 tests = self._test_instance.GetTests(device) |
308 tests = self._ApplyExternalSharding( | 309 tests = self._ApplyExternalSharding( |
309 tests, self._test_instance.external_shard_index, | 310 tests, self._test_instance.external_shard_index, |
310 self._test_instance.total_external_shards) | 311 self._test_instance.total_external_shards) |
311 return tests | 312 return tests |
312 | 313 |
313 #override | 314 #override |
314 def _GetUniqueTestName(self, test): | 315 def _GetUniqueTestName(self, test): |
315 return instrumentation_test_instance.GetUniqueTestName(test) | 316 return instrumentation_test_instance.GetUniqueTestName(test) |
316 | 317 |
317 #override | 318 #override |
(...skipping 393 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
711 timeout *= cls._GetTimeoutScaleFromAnnotations(annotations) | 712 timeout *= cls._GetTimeoutScaleFromAnnotations(annotations) |
712 | 713 |
713 return timeout | 714 return timeout |
714 | 715 |
715 def _IsRenderTest(test): | 716 def _IsRenderTest(test): |
716 """Determines if a test or list of tests has a RenderTest amongst them.""" | 717 """Determines if a test or list of tests has a RenderTest amongst them.""" |
717 if not isinstance(test, list): | 718 if not isinstance(test, list): |
718 test = [test] | 719 test = [test] |
719 return any([RENDER_TEST_FEATURE_ANNOTATION in t['annotations'].get( | 720 return any([RENDER_TEST_FEATURE_ANNOTATION in t['annotations'].get( |
720 FEATURE_ANNOTATION, {}).get('value', ()) for t in test]) | 721 FEATURE_ANNOTATION, {}).get('value', ()) for t in test]) |
OLD | NEW |