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

Unified Diff: build/android/pylib/local/device/local_device_gtest_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 side-by-side diff with in-line comments
Download patch
Index: build/android/pylib/local/device/local_device_gtest_run.py
diff --git a/build/android/pylib/local/device/local_device_gtest_run.py b/build/android/pylib/local/device/local_device_gtest_run.py
index 82da53546278d9ae7e8859d07a9a60e9033f4c86..a1212967b0b5cc99b14f664ab82378644780f96c 100644
--- a/build/android/pylib/local/device/local_device_gtest_run.py
+++ b/build/android/pylib/local/device/local_device_gtest_run.py
@@ -359,7 +359,6 @@ class LocalDeviceGtestRun(local_device_test_run.LocalDeviceTestRun):
logging.info('No tests found. Output:')
for l in raw_test_list:
logging.info(' %s', l)
- tests = self._test_instance.FilterTests(tests)
return tests
# Query all devices in case one fails.
@@ -370,7 +369,12 @@ class LocalDeviceGtestRun(local_device_test_run.LocalDeviceTestRun):
if all(not tl for tl in test_lists):
raise device_errors.CommandFailedError(
'Failed to list tests on any device')
- return list(sorted(set().union(*[set(tl) for tl in test_lists if tl])))
+ tests = list(sorted(set().union(*[set(tl) for tl in test_lists if tl])))
+ tests = self._test_instance.FilterTests(tests)
+ tests = self._ApplyExternalSharding(
+ tests, self._test_instance.external_shard_index,
+ self._test_instance.total_external_shards)
+ return tests
#override
def _RunTest(self, device, test):

Powered by Google App Engine
This is Rietveld 408576698