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

Issue 1027993002: Allow unit tests to force serial execution in the test launcher.

Created:
5 years, 9 months ago by dcheng
Modified:
5 years, 9 months ago
Reviewers:
Nico, Paweł Hajdan Jr.
CC:
dcheng, chromium-reviews, erikwright+watch_chromium.org, grt (UTC plus 2), jam
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Allow unit tests to force serial execution in the test launcher. Test case names that begin with "SERIALIZE_" are now always executed serially by the test launcher. When the new test launcher was initially enabled, the clipboard tests were moved to interactive_ui_tests because they require serial execution, due to the global nature of the clipboard. However, this meant that they never ran on Android, since Android has no interactive_ui_tests target. BUG=434620 R=phajdan.jr@chromium.org,thakis@chromium.org

Patch Set 1 #

Patch Set 2 : Fix Windows build #

Patch Set 3 : TestID experiment #

Unified diffs Side-by-side diffs Delta from patch set Stats (+171 lines, -55 lines) Patch
M base/gtest_prod_util.h View 1 2 1 chunk +7 lines, -0 lines 0 comments Download
A base/test/launcher/test_id.h View 1 2 1 chunk +30 lines, -0 lines 0 comments Download
A base/test/launcher/test_id.cc View 1 2 1 chunk +43 lines, -0 lines 0 comments Download
M base/test/launcher/unit_test_launcher.cc View 1 2 2 chunks +10 lines, -2 lines 0 comments Download
M chrome/chrome_tests.gypi View 1 2 1 chunk +0 lines, -1 line 0 comments Download
M ui/base/BUILD.gn View 2 chunks +4 lines, -4 lines 0 comments Download
M ui/base/clipboard/clipboard_test_template.h View 1 2 23 chunks +71 lines, -46 lines 0 comments Download
M ui/base/clipboard/clipboard_unittest.cc View 1 2 1 chunk +3 lines, -1 line 0 comments Download
M ui/base/test/test_clipboard_unittest.cc View 1 chunk +2 lines, -1 line 0 comments Download
M ui/base/ui_base_tests.gyp View 1 chunk +1 line, -0 lines 0 comments Download

Messages

Total messages: 4 (0 generated)
dcheng
The main objection I see is that marking tests for serial execution differs a little ...
5 years, 9 months ago (2015-03-21 13:37:13 UTC) #1
dcheng
(also, assuming this patch is OK, I plan on handling clipboard_android_unittest.cc in a followup patch)
5 years, 9 months ago (2015-03-21 13:37:33 UTC) #2
Paweł Hajdan Jr.
I'm open to changing the test launcher to allow this. Could you just start an ...
5 years, 9 months ago (2015-03-23 13:28:57 UTC) #3
dcheng
5 years, 9 months ago (2015-03-24 08:17:41 UTC) #4
So I sketched out what implementing jam@'s suggestion of hiding the SERIALIZE_
prefix might look like. Since this gets a bit involved, I wanted to get some
opinions before spending more time pursuing this.

In short, the places that pass around test names would change to use
base::TestID. This would have simple accessors for getting test name, the pretty
name for printing, as well as the original name to pass to the actual test
runner. Internally, it has the logic for stripping away test prefixes/reporting
them to interested parties.

If we do this, I think we'd want to do it for both DISABLED_and SERIALIZE(D)_.
It'd be a bit weird to do it for one but not the other. But I'm not sure if this
would result in more confusion--the set of tests that the runner executes
wouldn't look the same as the set of tests listed in the code. Thoughts?

Powered by Google App Engine
This is Rietveld 408576698