Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(653)

Side by Side Diff: build/android/pylib/local/device/local_device_instrumentation_test_run.py

Issue 2743873003: [Android] Add support for external sharding to the test runner. (Closed)
Patch Set: borked rebase Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « build/android/pylib/local/device/local_device_gtest_run.py ('k') | build/android/pylib/local/device/local_device_test_run.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698