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

Issue 1415533007: [Android] Add sharding for AMP instrumentation tests. (Closed)

Created:
5 years, 2 months ago by mikecase (-- gone --)
Modified:
4 years, 10 months ago
CC:
chromium-reviews, jbudorick+watch_chromium.org, klundberg+watch_chromium.org, yfriedman+watch_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Added --num-shards argument to the test_runner.py for remote tests. This argument currently only works for instrumentation tests. Also, to help with the sharding, I refactored the code that writes the appurify config files (each shard needs a slightly different config). Finally, just refactored some code as I went to make it easier to read BUG=

Patch Set 1 #

Patch Set 2 : Working version. #

Patch Set 3 : Removed Shard class. Changed implementation to be more similiar to local_device. #

Patch Set 4 : Lots of lint fixes. Cleanup. #

Patch Set 5 : #

Total comments: 44

Patch Set 6 : Fixed rnephew's nits. Most some of jbudorick's nits. #

Patch Set 7 : Fixed jbudoricks formatting nits. #

Patch Set 8 : #

Patch Set 9 : #

Patch Set 10 : Added context managers to manage life time. Reorganized some code. #

Patch Set 11 : #

Patch Set 12 : #

Total comments: 13

Patch Set 13 : Addressed rnephew's comments. #

Total comments: 8

Patch Set 14 : Removed RunThreadsSync and removed duplicated zip code. #

Patch Set 15 : Minor change to uirobot SetupTestShards. #

Total comments: 7
Unified diffs Side-by-side diffs Delta from patch set Stats (+513 lines, -410 lines) Patch
M build/android/devil/utils/parallelizer.py View 2 chunks +1 line, -2 lines 0 comments Download
M build/android/devil/utils/reraiser_thread.py View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +11 lines, -2 lines 2 comments Download
A build/android/devil/utils/tempdir.py View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +16 lines, -0 lines 1 comment Download
M build/android/pylib/remote/device/remote_device_environment.py View 1 2 3 4 5 6 7 8 9 10 11 12 13 chunks +72 lines, -50 lines 0 comments Download
M build/android/pylib/remote/device/remote_device_gtest_run.py View 1 2 3 4 5 6 7 8 9 10 11 12 13 3 chunks +36 lines, -19 lines 2 comments Download
M build/android/pylib/remote/device/remote_device_instrumentation_test_run.py View 1 2 3 4 5 6 7 8 9 10 11 12 13 2 chunks +76 lines, -39 lines 2 comments Download
M build/android/pylib/remote/device/remote_device_test_run.py View 1 2 3 4 5 6 7 8 9 10 11 12 13 7 chunks +264 lines, -262 lines 0 comments Download
M build/android/pylib/remote/device/remote_device_uirobot_test_run.py View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +31 lines, -32 lines 0 comments Download
M build/android/test_runner.py View 1 2 3 4 5 6 7 8 9 1 chunk +6 lines, -4 lines 0 comments Download

Messages

Total messages: 21 (3 generated)
mikecase (-- gone --)
If you are ever bored, please take a look through. Tested with instrumentation tests, gtests, ...
5 years, 1 month ago (2015-10-26 18:51:50 UTC) #3
rnephew (Reviews Here)
https://codereview.chromium.org/1415533007/diff/80001/build/android/pylib/remote/device/remote_device_environment.py File build/android/pylib/remote/device/remote_device_environment.py (right): https://codereview.chromium.org/1415533007/diff/80001/build/android/pylib/remote/device/remote_device_environment.py#newcode364 build/android/pylib/remote/device/remote_device_environment.py:364: def network_config(self): Nit: Alphabetical order on properties. https://codereview.chromium.org/1415533007/diff/80001/build/android/pylib/remote/device/remote_device_gtest_run.py File ...
5 years, 1 month ago (2015-10-26 20:42:18 UTC) #4
jbudorick
Great news! I got bored while waiting for some tests to finish. https://codereview.chromium.org/1415533007/diff/80001/build/android/pylib/remote/device/remote_device_environment.py File build/android/pylib/remote/device/remote_device_environment.py ...
5 years, 1 month ago (2015-10-26 22:23:30 UTC) #5
mikecase (-- gone --)
https://codereview.chromium.org/1415533007/diff/80001/build/android/pylib/remote/device/remote_device_environment.py File build/android/pylib/remote/device/remote_device_environment.py (right): https://codereview.chromium.org/1415533007/diff/80001/build/android/pylib/remote/device/remote_device_environment.py#newcode273 build/android/pylib/remote/device/remote_device_environment.py:273: self._devices.extend( On 2015/10/26 at 22:23:30, jbudorick wrote: > I ...
5 years, 1 month ago (2015-10-27 01:27:44 UTC) #6
jbudorick
(I'll re-review tomorrow.) https://codereview.chromium.org/1415533007/diff/80001/build/android/pylib/remote/device/remote_device_test_run.py File build/android/pylib/remote/device/remote_device_test_run.py (right): https://codereview.chromium.org/1415533007/diff/80001/build/android/pylib/remote/device/remote_device_test_run.py#newcode357 build/android/pylib/remote/device/remote_device_test_run.py:357: access_token=self._env.token, On 2015/10/27 01:27:43, mikecase wrote: ...
5 years, 1 month ago (2015-10-27 01:30:32 UTC) #7
mikecase (-- gone --)
Have an idea on how to make this CL less sucky. Hold off on the ...
5 years, 1 month ago (2015-10-28 22:23:14 UTC) #8
mikecase (-- gone --)
Please take a look through and give feedback. Tried to bring back context managers to ...
5 years, 1 month ago (2015-11-04 20:31:36 UTC) #9
rnephew (Wrong account)
https://codereview.chromium.org/1415533007/diff/220001/build/android/devil/utils/tempdir.py File build/android/devil/utils/tempdir.py (right): https://codereview.chromium.org/1415533007/diff/220001/build/android/devil/utils/tempdir.py#newcode1 build/android/devil/utils/tempdir.py:1: # Copyright 2015 The Chromium Authors. All rights reserved. ...
5 years, 1 month ago (2015-11-04 22:22:03 UTC) #11
mikecase (-- gone --)
https://codereview.chromium.org/1415533007/diff/220001/build/android/pylib/remote/device/remote_device_environment.py File build/android/pylib/remote/device/remote_device_environment.py (left): https://codereview.chromium.org/1415533007/diff/220001/build/android/pylib/remote/device/remote_device_environment.py#oldcode257 build/android/pylib/remote/device/remote_device_environment.py:257: random.shuffle(device_list) On 2015/11/04 at 22:22:02, rnephew wrote: > This ...
5 years, 1 month ago (2015-11-05 23:17:41 UTC) #12
mikecase (-- gone --)
ping
5 years, 1 month ago (2015-11-12 21:15:22 UTC) #13
rnephew (Wrong account)
On 2015/11/12 21:15:22, mikecase wrote: > ping I'd give John another chance to review it, ...
5 years, 1 month ago (2015-11-12 22:11:30 UTC) #14
jbudorick
On 2015/11/12 22:11:30, rnephew wrote: > On 2015/11/12 21:15:22, mikecase wrote: > > ping > ...
5 years, 1 month ago (2015-11-12 22:18:32 UTC) #15
mikecase (-- gone --)
On 2015/11/12 at 22:18:32, jbudorick wrote: > On 2015/11/12 22:11:30, rnephew wrote: > > On ...
5 years, 1 month ago (2015-11-17 17:56:42 UTC) #16
jbudorick
partial review -- back to the drawing board https://codereview.chromium.org/1415533007/diff/240001/build/android/devil/utils/reraiser_thread.py File build/android/devil/utils/reraiser_thread.py (right): https://codereview.chromium.org/1415533007/diff/240001/build/android/devil/utils/reraiser_thread.py#newcode230 build/android/devil/utils/reraiser_thread.py:230: def ...
5 years, 1 month ago (2015-11-17 18:04:46 UTC) #17
mikecase (-- gone --)
Factored out shared zipfile code that was pretty much duplicated in remote_device_instrumentation_test_run.py and remote_device_gtest_test_run.py. Also ...
5 years, 1 month ago (2015-11-19 01:35:38 UTC) #18
mikecase (-- gone --)
I gave this CL another look over and I think it's in a pretty good ...
5 years, 1 month ago (2015-11-20 02:01:58 UTC) #19
mikecase (-- gone --)
On 2015/11/20 at 02:01:58, mikecase wrote: > I gave this CL another look over and ...
5 years ago (2015-11-24 16:57:25 UTC) #20
jbudorick
5 years ago (2015-12-01 04:07:13 UTC) #21
another partial review, will return tomorrow

https://codereview.chromium.org/1415533007/diff/280001/build/android/devil/ut...
File build/android/devil/utils/reraiser_thread.py (right):

https://codereview.chromium.org/1415533007/diff/280001/build/android/devil/ut...
build/android/devil/utils/reraiser_thread.py:229: args = args or
[None]*len(funcs)
where's the linter when I need it... spaces around operators, plz

https://codereview.chromium.org/1415533007/diff/280001/build/android/devil/ut...
build/android/devil/utils/reraiser_thread.py:234: ReraiserThread(f, args=a,
kwargs=k, name=n)
Adding these probably means you're abusing RunAsync somewhere...

https://codereview.chromium.org/1415533007/diff/280001/build/android/devil/ut...
File build/android/devil/utils/tempdir.py (right):

https://codereview.chromium.org/1415533007/diff/280001/build/android/devil/ut...
build/android/devil/utils/tempdir.py:10: def TempDir(suffix='', prefix='',
delete=True):
conflicts with your other review at this point, which I suppose is my fault.

https://codereview.chromium.org/1415533007/diff/280001/build/android/pylib/re...
File build/android/pylib/remote/device/remote_device_gtest_run.py (right):

https://codereview.chromium.org/1415533007/diff/280001/build/android/pylib/re...
build/android/pylib/remote/device/remote_device_gtest_run.py:44: # pylint:
disable=protected-access
Why'd you move this up?

https://codereview.chromium.org/1415533007/diff/280001/build/android/pylib/re...
build/android/pylib/remote/device/remote_device_gtest_run.py:75: with
tempfile.NamedTemporaryFile(suffix='.zip') as test_package:
Why doesn't _PackageTest do this for us? i.e., couldn't you change _PackageTest
s.t. this becomes something like

  with self._PackageTest(self._test_instance.apk, data_deps) as test_package:

https://codereview.chromium.org/1415533007/diff/280001/build/android/pylib/re...
File build/android/pylib/remote/device/remote_device_instrumentation_test_run.py
(right):

https://codereview.chromium.org/1415533007/diff/280001/build/android/pylib/re...
build/android/pylib/remote/device/remote_device_instrumentation_test_run.py:62:
def _SetupTestShards(self, num_shards):
This function is also doing too much. It shouldn't be generating the list of
tests in each shard and packaging & uploading all of the shards.

https://codereview.chromium.org/1415533007/diff/280001/build/android/pylib/re...
build/android/pylib/remote/device/remote_device_instrumentation_test_run.py:108:
funcs=[upload_test_shards]*num_shards,
I'd prefer you not add args, kwargs, or names to RunAsync and instead bind
whatever you need into nullary callables.

Powered by Google App Engine
This is Rietveld 408576698