New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 692200 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Mar 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Android
Pri: 2
Type: Bug

Blocking:
issue 670879



Sign in to add a comment

Add sharding logic to android's test runner

Project Member Reported by bpastene@chromium.org, Feb 14 2017

Issue description

That is, allow it to shard a suite of tests across multiple invocations of the test runner. This would allow for swarming to shard a single android suite N times and run them in parallel. This would come in handy when all android bots are swarmed at a per-device level. An entire chrome_public suite would take too long on a single device.

From offline talk with jbudorick@: Much like the desktop test runner, we'd probably want to add a --shard-num and --max-shard args and have some fancy hashing algorithm in the test harness determine which of a suite's tests to run based on those two values.
 
Blocking: 670879
Ideally, for gtests, this would transparently pass the flags into the test launcher. I'm not sure if that will work currently, though, as it depends on both whether Android gets to that part of the test launcher and how --gtest_list_tests behaves with the two sharding arguments.
That said, we'll still need to implement this logic in the test runner for instrumentation tests.
Any plans as of yet? I'd love to see some dope sharding in use on https://build.chromium.org/p/chromium.swarm/builders/Android%20Swarm
Owner: jbudorick@chromium.org
Status: Assigned (was: Untriaged)
I'll do this this week.
Project Member

Comment 6 by bugdroid1@chromium.org, Mar 15 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/84188b5c73a3bd70944aac7028dbdd449e9e5b73

commit 84188b5c73a3bd70944aac7028dbdd449e9e5b73
Author: jbudorick <jbudorick@chromium.org>
Date: Wed Mar 15 05:29:24 2017

[Android] Add support for external sharding to the test runner.

This adds support for sharding via GTEST_SHARD_INDEX and
GTEST_TOTAL_SHARDS (along with their equivalent --test-launcher-*
command-line options), matching the behavior of //base/test/launcher
for both gtests and instrumentation tests.

BUG= 692200 

Review-Url: https://codereview.chromium.org/2743873003
Cr-Commit-Position: refs/heads/master@{#457001}

[modify] https://crrev.com/84188b5c73a3bd70944aac7028dbdd449e9e5b73/build/android/pylib/gtest/gtest_test_instance.py
[modify] https://crrev.com/84188b5c73a3bd70944aac7028dbdd449e9e5b73/build/android/pylib/instrumentation/instrumentation_test_instance.py
[modify] https://crrev.com/84188b5c73a3bd70944aac7028dbdd449e9e5b73/build/android/pylib/local/device/local_device_gtest_run.py
[modify] https://crrev.com/84188b5c73a3bd70944aac7028dbdd449e9e5b73/build/android/pylib/local/device/local_device_instrumentation_test_run.py
[modify] https://crrev.com/84188b5c73a3bd70944aac7028dbdd449e9e5b73/build/android/pylib/local/device/local_device_test_run.py
[modify] https://crrev.com/84188b5c73a3bd70944aac7028dbdd449e9e5b73/build/android/test_runner.py
[modify] https://crrev.com/84188b5c73a3bd70944aac7028dbdd449e9e5b73/testing/buildbot/chromium.swarm.json

Status: Fixed (was: Assigned)

Sign in to add a comment