| 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 e740f564a23cdb8cb8c52aac216b99421a1d977d..bfb59c6a4b1fbab2ba63421ce4f8545f628bedf4 100644
|
| --- a/build/android/pylib/local/device/local_device_gtest_run.py
|
| +++ b/build/android/pylib/local/device/local_device_gtest_run.py
|
| @@ -282,9 +282,19 @@ class LocalDeviceGtestRun(local_device_test_run.LocalDeviceTestRun):
|
| return True
|
|
|
| #override
|
| - def _CreateShards(self, tests):
|
| + def _CreateShards(self, tests, suspects = []):
|
| + # Suspects are tests that might crash and make the tests in the same shard
|
| + # following the supect not run. Thus we need to create separate shards for
|
| + # each suspects, so that other tests can be run.
|
| device_count = len(self._env.devices)
|
| shards = []
|
| +
|
| + # Add shards with only one suspect testcase.
|
| + shards += [[suspect] for suspect in suspects]
|
| +
|
| + # Delete suspect testcase from tests.
|
| + tests = [test for test in tests if not test in suspects]
|
| +
|
| for i in xrange(0, device_count):
|
| unbounded_shard = tests[i::device_count]
|
| shards += [unbounded_shard[j:j+_MAX_SHARD_SIZE]
|
|
|