Skip to content

Commit

Permalink
[Android] Fix error in sharding of gtests.
Browse files Browse the repository at this point in the history
The formula for splitting tests into |device_num| shards
has always been incorrect.

BUG=

Review URL: https://codereview.chromium.org/12033066

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@178462 0039d316-1c4b-4281-b951-d872f2087c98
  • Loading branch information
frankf@chromium.org committed Jan 24, 2013
1 parent ad91e94 commit ebf911a
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions build/android/run_tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -176,8 +176,7 @@ def CreateShardedTestRunner(self, device, index):
A SingleTestRunner object.
"""
device_num = len(self.attached_devices)
shard_size = (len(self.tests) + device_num - 1) / device_num
shard_test_list = self.tests[index * shard_size : (index + 1) * shard_size]
shard_test_list = self.tests[index::device_num]
test_filter = ':'.join(shard_test_list) + self.gtest_filter
return SingleTestRunner(
device,
Expand Down

0 comments on commit ebf911a

Please sign in to comment.