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

Issue 18444004: Makes host driven tests use the common sharder. (Closed)

Created:
7 years, 5 months ago by gkanwar
Modified:
7 years, 4 months ago
Reviewers:
craigdh, bulach, frankf
CC:
chromium-reviews, craigdh+watch_chromium.org, bulach+watch_chromium.org, yfriedman+watch_chromium.org, ilevy-cc_chromium.org, klundberg+watch_chromium.org, frankf+watch_chromium.org, navabi1
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Visibility:
Public.

Description

Makes host driven tests use the common sharder. This also updates the sharder to give the option of 'distribute' vs 'duplicate' for running the given set of tests. 'distribute' uses the current sharding method (create a pool of tests, have test runner draw from this pool as they do each test). 'duplicate' is currently used only for Monkey tests; it duplicates the tests across all test runners. This is useful for Monkeys tests when we're running on a heterogeneous set of devices. In the future, we probably want to move the option to duplicate vs. distribute to the buildbot config, since it is somewhat dependent on the actual physics setup (e.g. we don't want to duplicate if all devices are identical...) BUG=176323, 259063, 259128

Patch Set 1 #

Total comments: 12

Patch Set 2 : Creates two functions for sharding and replication #

Total comments: 2

Patch Set 3 : Fixes calls to Dispatch and the RunTests functions #

Unified diffs Side-by-side diffs Delta from patch set Stats (+334 lines, -517 lines) Patch
M build/android/pylib/base/shard.py View 1 2 chunks +65 lines, -19 lines 0 comments Download
M build/android/pylib/base/shard_unittest.py View 1 4 chunks +35 lines, -6 lines 0 comments Download
M build/android/pylib/browsertests/dispatch.py View 1 2 7 chunks +14 lines, -21 lines 0 comments Download
A build/android/pylib/dispatch.py View 1 2 1 chunk +65 lines, -0 lines 0 comments Download
M build/android/pylib/gtest/dispatch.py View 1 2 10 chunks +13 lines, -35 lines 0 comments Download
D build/android/pylib/host_driven/python_test_caller.py View 1 chunk +0 lines, -115 lines 0 comments Download
M build/android/pylib/host_driven/python_test_sharder.py View 2 chunks +67 lines, -162 lines 0 comments Download
M build/android/pylib/host_driven/run_python_tests.py View 3 chunks +37 lines, -63 lines 0 comments Download
M build/android/pylib/host_driven/tests_annotations.py View 1 chunk +1 line, -1 line 0 comments Download
M build/android/pylib/instrumentation/dispatch.py View 1 2 3 chunks +6 lines, -18 lines 0 comments Download
M build/android/pylib/uiautomator/dispatch.py View 1 2 3 chunks +5 lines, -14 lines 0 comments Download
M build/android/run_monkey_test.py View 1 2 3 chunks +13 lines, -22 lines 0 comments Download
M build/android/test_runner.py View 6 chunks +13 lines, -41 lines 0 comments Download

Messages

Total messages: 13 (0 generated)
gkanwar
7 years, 5 months ago (2013-07-12 17:46:48 UTC) #1
gkanwar
On 2013/07/12 17:46:48, gkanwar wrote: Note: this will temporarily break Popular URL tests downstream.
7 years, 5 months ago (2013-07-12 18:04:53 UTC) #2
craigdh
https://codereview.chromium.org/18444004/diff/1/build/android/pylib/base/shard.py File build/android/pylib/base/shard.py (right): https://codereview.chromium.org/18444004/diff/1/build/android/pylib/base/shard.py#newcode288 build/android/pylib/base/shard.py:288: sharding='distribute'): The behavior is quite different, I think it ...
7 years, 5 months ago (2013-07-12 18:14:14 UTC) #3
gkanwar
https://codereview.chromium.org/18444004/diff/1/build/android/pylib/base/shard.py File build/android/pylib/base/shard.py (right): https://codereview.chromium.org/18444004/diff/1/build/android/pylib/base/shard.py#newcode288 build/android/pylib/base/shard.py:288: sharding='distribute'): On 2013/07/12 18:14:15, craigdh wrote: > The behavior ...
7 years, 5 months ago (2013-07-12 18:22:41 UTC) #4
frankf
https://codereview.chromium.org/18444004/diff/1/build/android/pylib/base/shard.py File build/android/pylib/base/shard.py (right): https://codereview.chromium.org/18444004/diff/1/build/android/pylib/base/shard.py#newcode288 build/android/pylib/base/shard.py:288: sharding='distribute'): I still think the semantics is confusing. Sharding ...
7 years, 5 months ago (2013-07-12 18:49:19 UTC) #5
gkanwar
https://codereview.chromium.org/18444004/diff/1/build/android/pylib/base/shard.py File build/android/pylib/base/shard.py (right): https://codereview.chromium.org/18444004/diff/1/build/android/pylib/base/shard.py#newcode288 build/android/pylib/base/shard.py:288: sharding='distribute'): On 2013/07/12 18:49:19, frankf wrote: > I still ...
7 years, 5 months ago (2013-07-12 18:52:03 UTC) #6
craigdh
https://codereview.chromium.org/18444004/diff/1/build/android/pylib/base/shard.py File build/android/pylib/base/shard.py (right): https://codereview.chromium.org/18444004/diff/1/build/android/pylib/base/shard.py#newcode288 build/android/pylib/base/shard.py:288: sharding='distribute'): On 2013/07/12 18:49:19, frankf wrote: > I still ...
7 years, 5 months ago (2013-07-12 19:03:36 UTC) #7
gkanwar
https://codereview.chromium.org/18444004/diff/1/build/android/pylib/base/shard.py File build/android/pylib/base/shard.py (right): https://codereview.chromium.org/18444004/diff/1/build/android/pylib/base/shard.py#newcode288 build/android/pylib/base/shard.py:288: sharding='distribute'): On 2013/07/12 19:03:36, craigdh wrote: > On 2013/07/12 ...
7 years, 5 months ago (2013-07-12 19:22:31 UTC) #8
gkanwar
On 2013/07/12 19:22:31, gkanwar wrote: > https://codereview.chromium.org/18444004/diff/1/build/android/pylib/base/shard.py > File build/android/pylib/base/shard.py (right): > > https://codereview.chromium.org/18444004/diff/1/build/android/pylib/base/shard.py#newcode288 > ...
7 years, 5 months ago (2013-07-12 22:14:25 UTC) #9
frankf
https://codereview.chromium.org/18444004/diff/1/build/android/pylib/gtest/dispatch.py File build/android/pylib/gtest/dispatch.py (right): https://codereview.chromium.org/18444004/diff/1/build/android/pylib/gtest/dispatch.py#newcode210 build/android/pylib/gtest/dispatch.py:210: runner_factory: callable that takes devide and shard_index and returns ...
7 years, 5 months ago (2013-07-12 22:28:28 UTC) #10
gkanwar
https://codereview.chromium.org/18444004/diff/1/build/android/pylib/gtest/dispatch.py File build/android/pylib/gtest/dispatch.py (right): https://codereview.chromium.org/18444004/diff/1/build/android/pylib/gtest/dispatch.py#newcode210 build/android/pylib/gtest/dispatch.py:210: runner_factory: callable that takes devide and shard_index and returns ...
7 years, 5 months ago (2013-07-12 22:53:34 UTC) #11
gkanwar
On 2013/07/12 22:53:34, gkanwar wrote: > https://codereview.chromium.org/18444004/diff/1/build/android/pylib/gtest/dispatch.py > File build/android/pylib/gtest/dispatch.py (right): > > https://codereview.chromium.org/18444004/diff/1/build/android/pylib/gtest/dispatch.py#newcode210 > ...
7 years, 5 months ago (2013-07-12 23:33:30 UTC) #12
Philippe
7 years, 5 months ago (2013-07-17 13:44:30 UTC) #13
Message was sent while issue was closed.
On 2013/07/12 23:33:30, gkanwar wrote:
> On 2013/07/12 22:53:34, gkanwar wrote:
> >
>
https://codereview.chromium.org/18444004/diff/1/build/android/pylib/gtest/dis...
> > File build/android/pylib/gtest/dispatch.py (right):
> > 
> >
>
https://codereview.chromium.org/18444004/diff/1/build/android/pylib/gtest/dis...
> > build/android/pylib/gtest/dispatch.py:210: runner_factory: callable that
takes
> > devide and shard_index and returns
> > On 2013/07/12 22:28:28, frankf wrote:
> > > ?
> > 
> > s/devide/device/
> > 
> > Fixed.
> > 
> >
>
https://codereview.chromium.org/18444004/diff/1/build/android/pylib/gtest/dis...
> > build/android/pylib/gtest/dispatch.py:251: if not
> > ports.ResetTestServerPortAllocation():
> > On 2013/07/12 22:28:28, frankf wrote:
> > > There's still a lot of duplication in dispatch files. Essentially, all
> you're
> > > really doing is taking options as the input, and returning the tuple (test
> > > runner factory, tests, shard vs. replicate).
> > 
> > I think the only duplication that exists currently is logging and the
> > ResetTestServerPortAllocation for content_browsertests and gtests. Perhaps
we
> > should move logging out into test_runner. For the test server ports, I meant
> to
> > put a TODO here, but it should probably get moved out of RunGTests also...
> just
> > not sure where yet.
> > 
> > For gtests and content_browsertests there is also some amount of duplication
> in
> > how we get the tests, since they are so similar. Perhaps we could move that
> out
> > into a function for gtests and have content_browsertests import and call
that
> > function with a paramater to indicate it should get the content_browser
suite?
> > 
> >
>
https://codereview.chromium.org/18444004/diff/15001/build/android/pylib/dispa...
> > File build/android/pylib/dispatch.py (right):
> > 
> >
>
https://codereview.chromium.org/18444004/diff/15001/build/android/pylib/dispa...
> > build/android/pylib/dispatch.py:5: """Common dispatcher for all test
types."""
> > On 2013/07/12 22:28:28, frankf wrote:
> > > Let's just fold this into test_runner.py
> > 
> > Some of the downstream scripts will be using this also (namely
> > run_popular_urls_test.py). I think it makes sense to leave it in pylib so
they
> > can access it without importing test_runner.py.
> 
> Just talked to Frank -- I'm going to split this into two CLs. The first one
will
> be general sharding refactoring, and the second will be refactoring
host_driven
> tests.

FYI, I added a call to 'Forwarder.UseMultiProcessing()' in
python_test_sharder.py. You will need to remove it once you got rid of
multiprocessing.

Powered by Google App Engine
This is Rietveld 408576698