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

Issue 14882007: Android: support glob-style gtest filters with content browser tests (Closed)

Created:
7 years, 7 months ago by Sami
Modified:
7 years, 6 months ago
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
Visibility:
Public.

Description

Android: support glob-style gtest filters with content browser tests This patch makes it possible to use glob-style gtest filters with the content browser tests. An example of such a filter is WebGLConformanceTest.*, which should cause all the WebGL conformance tests to be run. Previously the gtest filter was passed directly to the test executable, causing it to run all matching tests successively in the same process. Normally this would be fine, but with content browsertests we must run each test in a fresh process to avoid issues with double initialization. The fix is to expand the filter to a flat list of tests in the test dispatcher. After this, the tests are sharded and run in exactly the same way as when no gtest filter is provided. BUG=138226 Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=204680

Patch Set 1 #

Total comments: 2

Patch Set 2 : Better docstring. #

Total comments: 4

Patch Set 3 : Use existing gtest filter evaluation code. #

Total comments: 3

Patch Set 4 : Move shared code to build/pylib. #

Total comments: 1

Patch Set 5 : Rename to build/buildpylib. #

Total comments: 4

Patch Set 6 : Add FilterTestNames. #

Patch Set 7 : Move code to build/util/lib. #

Total comments: 2

Patch Set 8 : Delete unneeded import. #

Total comments: 2

Patch Set 9 : Use DIR_SOURCE_ROOT. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+41 lines, -330 lines) Patch
M build/android/pylib/browsertests/dispatch.py View 1 2 3 4 5 6 7 8 3 chunks +8 lines, -4 lines 0 comments Download
A + build/util/lib/common/__init__.py View 1 2 3 4 5 6 0 chunks +-1 lines, --1 lines 0 comments Download
A + build/util/lib/common/unittest_util.py View 1 2 3 4 5 6 2 chunks +25 lines, -4 lines 0 comments Download
A + build/util/lib/common/util.py View 1 2 3 4 5 6 0 chunks +-1 lines, --1 lines 0 comments Download
M chrome/test/install_test/install_test.py View 1 2 3 4 5 6 7 1 chunk +2 lines, -1 line 0 comments Download
M chrome/test/install_test/run_install_tests.py View 1 2 3 4 5 6 1 chunk +4 lines, -0 lines 0 comments Download
M chrome/test/install_test/theme_updater.py View 1 2 3 4 5 6 1 chunk +5 lines, -0 lines 0 comments Download
D chrome/test/pylib/common/__init__.py View 1 2 3 0 chunks +-1 lines, --1 lines 0 comments Download
D chrome/test/pylib/common/chrome_paths.py View 1 2 3 1 chunk +0 lines, -43 lines 0 comments Download
M chrome/test/pylib/common/unittest_util.py View 1 2 3 1 chunk +0 lines, -130 lines 0 comments Download
D chrome/test/pylib/common/util.py View 1 2 3 1 chunk +0 lines, -151 lines 0 comments Download

Messages

Total messages: 34 (0 generated)
Sami
7 years, 7 months ago (2013-05-13 13:05:27 UTC) #1
bulach
lgtm but please wait for nilesh/craig/frank since I haven't touched this in quite a while ...
7 years, 7 months ago (2013-05-13 13:19:37 UTC) #2
Sami
Thanks Marcus. Adding Nilesh for a second opinion. https://codereview.chromium.org/14882007/diff/1/build/android/pylib/browsertests/dispatch.py File build/android/pylib/browsertests/dispatch.py (right): https://codereview.chromium.org/14882007/diff/1/build/android/pylib/browsertests/dispatch.py#newcode87 build/android/pylib/browsertests/dispatch.py:87: """Computes ...
7 years, 7 months ago (2013-05-13 14:58:10 UTC) #3
Yaron
Nilesh is on vacation for a few weeks so you probably want someone else.
7 years, 7 months ago (2013-05-13 16:03:47 UTC) #4
frankf
https://codereview.chromium.org/14882007/diff/4001/build/android/pylib/browsertests/dispatch.py File build/android/pylib/browsertests/dispatch.py (right): https://codereview.chromium.org/14882007/diff/4001/build/android/pylib/browsertests/dispatch.py#newcode86 build/android/pylib/browsertests/dispatch.py:86: def _ApplyGtestFilter(all_enabled_tests, gtest_filter): Take a look at //chrome/test/pylib/common/unittest_util.py#FilterTests Since ...
7 years, 7 months ago (2013-05-16 01:15:52 UTC) #5
Sami
Thanks Frank. This version reuses the existing gtest filter code. Also adding Paweł since I ...
7 years, 7 months ago (2013-05-16 10:41:33 UTC) #6
frankf
lgtm w/ a question Thanks! https://codereview.chromium.org/14882007/diff/9001/build/android/pylib/browsertests/dispatch.py File build/android/pylib/browsertests/dispatch.py (right): https://codereview.chromium.org/14882007/diff/9001/build/android/pylib/browsertests/dispatch.py#newcode63 build/android/pylib/browsertests/dispatch.py:63: all_tests = unittest_util.FilterTests(all_enabled, options.gtest_filter) ...
7 years, 7 months ago (2013-05-16 17:15:18 UTC) #7
Sami
On 2013/05/16 17:15:18, frankf wrote: > So we don't want to filter out PRE_ and ...
7 years, 7 months ago (2013-05-16 17:38:26 UTC) #8
Paweł Hajdan Jr.
https://codereview.chromium.org/14882007/diff/9001/build/android/pylib/browsertests/dispatch.py File build/android/pylib/browsertests/dispatch.py (right): https://codereview.chromium.org/14882007/diff/9001/build/android/pylib/browsertests/dispatch.py#newcode20 build/android/pylib/browsertests/dispatch.py:20: from common import unittest_util This suggest things should be ...
7 years, 7 months ago (2013-05-16 18:26:28 UTC) #9
Sami
On 2013/05/16 18:26:28, Paweł Hajdan Jr. wrote: > This suggest things should be moved down ...
7 years, 7 months ago (2013-05-16 18:55:26 UTC) #10
Sami
This version moves the shared test utilities to build/pylib, which is a new directory. Note ...
7 years, 6 months ago (2013-05-28 16:35:18 UTC) #11
bulach
suggestion below, apologies for my poor choice in the first place.. :-/ https://codereview.chromium.org/14882007/diff/17001/build/android/pylib/browsertests/dispatch.py File build/android/pylib/browsertests/dispatch.py ...
7 years, 6 months ago (2013-05-28 16:42:39 UTC) #12
Sami
On 2013/05/28 16:42:39, bulach wrote: > having build/pylib would be very confusing... perhaps build/buildpylib would ...
7 years, 6 months ago (2013-05-28 16:48:51 UTC) #13
Paweł Hajdan Jr.
https://codereview.chromium.org/14882007/diff/21001/build/android/pylib/browsertests/dispatch.py File build/android/pylib/browsertests/dispatch.py (right): https://codereview.chromium.org/14882007/diff/21001/build/android/pylib/browsertests/dispatch.py#newcode18 build/android/pylib/browsertests/dispatch.py:18: sys.path.append(os.path.join(constants.CHROME_DIR, 'build', 'buildpylib')) Looks like files have been moved ...
7 years, 6 months ago (2013-05-28 17:00:06 UTC) #14
frankf
Not wanting to start a bike shed argument, but there's already build/util directory, it might ...
7 years, 6 months ago (2013-05-28 17:09:21 UTC) #15
Sami
https://codereview.chromium.org/14882007/diff/21001/build/android/pylib/browsertests/dispatch.py File build/android/pylib/browsertests/dispatch.py (right): https://codereview.chromium.org/14882007/diff/21001/build/android/pylib/browsertests/dispatch.py#newcode18 build/android/pylib/browsertests/dispatch.py:18: sys.path.append(os.path.join(constants.CHROME_DIR, 'build', 'buildpylib')) On 2013/05/28 17:00:06, Paweł Hajdan Jr. ...
7 years, 6 months ago (2013-05-28 17:17:06 UTC) #16
Sami
On 2013/05/28 17:09:21, frankf wrote: > Not wanting to start a bike shed argument, but ...
7 years, 6 months ago (2013-05-28 17:20:24 UTC) #17
frankf
lgtm w/ nit https://codereview.chromium.org/14882007/diff/30001/chrome/test/install_test/install_test.py File chrome/test/install_test/install_test.py (right): https://codereview.chromium.org/14882007/diff/30001/chrome/test/install_test/install_test.py#newcode24 chrome/test/install_test/install_test.py:24: sys.path.append(os.path.join(_DIRECTORY, os.path.pardir, 'pylib')) Delete?
7 years, 6 months ago (2013-05-28 17:41:43 UTC) #18
bulach
lgtm, but the problem still remains :) since "util" is not a top-level module, the ...
7 years, 6 months ago (2013-05-28 18:08:36 UTC) #19
Sami
https://codereview.chromium.org/14882007/diff/30001/chrome/test/install_test/install_test.py File chrome/test/install_test/install_test.py (right): https://codereview.chromium.org/14882007/diff/30001/chrome/test/install_test/install_test.py#newcode24 chrome/test/install_test/install_test.py:24: sys.path.append(os.path.join(_DIRECTORY, os.path.pardir, 'pylib')) On 2013/05/28 17:41:43, frankf wrote: > ...
7 years, 6 months ago (2013-05-28 18:13:29 UTC) #20
Sami
Paweł, any thoughts on the latest version?
7 years, 6 months ago (2013-05-31 10:19:11 UTC) #21
Paweł Hajdan Jr.
https://codereview.chromium.org/14882007/diff/34001/build/android/pylib/browsertests/dispatch.py File build/android/pylib/browsertests/dispatch.py (right): https://codereview.chromium.org/14882007/diff/34001/build/android/pylib/browsertests/dispatch.py#newcode18 build/android/pylib/browsertests/dispatch.py:18: sys.path.append(os.path.join(constants.CHROME_DIR, 'build', 'util', 'lib')) Does CHROME_DIR refer to src ...
7 years, 6 months ago (2013-05-31 16:49:17 UTC) #22
Sami
On 2013/05/31 16:49:17, Paweł Hajdan Jr. wrote: > Does CHROME_DIR refer to src or src/chrome? ...
7 years, 6 months ago (2013-05-31 16:59:23 UTC) #23
Sami
Do you think we could go ahead with this patch? I'd like to land this ...
7 years, 6 months ago (2013-06-04 12:48:27 UTC) #24
Paweł Hajdan Jr.
On 2013/05/31 16:59:23, Sami wrote: > CHROME_DIR refers to src/, i.e., the top-level source directory. ...
7 years, 6 months ago (2013-06-04 18:02:57 UTC) #25
bulach
hey pawel, I understand your desire to clean this up, but I don't see why ...
7 years, 6 months ago (2013-06-04 18:11:14 UTC) #26
frankf
Pawel, although your intentions are good, I think it's counter-productive in this case. Aside from ...
7 years, 6 months ago (2013-06-05 16:54:53 UTC) #27
scherkus (not reviewing)
On 2013/06/05 16:54:53, frankf wrote: > Pawel, although your intentions are good, I think it's ...
7 years, 6 months ago (2013-06-06 20:22:07 UTC) #28
Paweł Hajdan Jr.
https://codereview.chromium.org/14882007/diff/34001/build/android/pylib/browsertests/dispatch.py File build/android/pylib/browsertests/dispatch.py (right): https://codereview.chromium.org/14882007/diff/34001/build/android/pylib/browsertests/dispatch.py#newcode18 build/android/pylib/browsertests/dispatch.py:18: sys.path.append(os.path.join(constants.CHROME_DIR, 'build', 'util', 'lib')) This can now be DIR_SOURCE_ROOT, ...
7 years, 6 months ago (2013-06-06 20:50:57 UTC) #29
Sami
On 2013/06/06 20:50:57, Paweł Hajdan Jr. wrote: > https://codereview.chromium.org/14882007/diff/34001/build/android/pylib/browsertests/dispatch.py > File build/android/pylib/browsertests/dispatch.py (right): > > ...
7 years, 6 months ago (2013-06-06 21:25:22 UTC) #30
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/skyostil@chromium.org/14882007/45001
7 years, 6 months ago (2013-06-06 21:26:30 UTC) #31
commit-bot: I haz the power
Change committed as 204680
7 years, 6 months ago (2013-06-07 00:50:15 UTC) #32
nilesh
This broke content_browsertests on fyi. @@@BUILD_STEP content_browsertests@@@ > build/android/run_browser_tests.py --verbose Traceback (most recent call last): ...
7 years, 6 months ago (2013-06-07 19:25:34 UTC) #33
frankf
7 years, 6 months ago (2013-06-08 00:32:18 UTC) #34
Message was sent while issue was closed.
On 2013/06/07 19:25:34, nilesh wrote:
> This broke content_browsertests on fyi. 
> @@@BUILD_STEP content_browsertests@@@
> > build/android/run_browser_tests.py --verbose
> Traceback (most recent call last):
>   File "build/android/run_browser_tests.py", line 12, in <module>
>     from pylib.browsertests import dispatch
>   File
>
"/b/build/slave/Android_Tests__JB_Nexus7__dbg_/build/src/build/android/pylib/browsertests/dispatch.py",
> line 20, in <module>
>     from common import unittest_util
> ImportError: cannot import name unittest_util
> < build/android/run_browser_tests.py --verbose
> ERROR: process exited with code 1
> @@@STEP_FAILURE@@@

Fix here: https://codereview.chromium.org/16124010/
The issue is that there's also a common lib on the buildbot side
(build/scripts/common)

Powered by Google App Engine
This is Rietveld 408576698