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

Issue 2779193002: Roll googletest to 1.8.0. (Closed)

Created:
3 years, 8 months ago by pwnall
Modified:
3 years, 7 months ago
Reviewers:
rkc, Dirk Pranke, Nico, skobes, agl
CC:
chromium-reviews
Target Ref:
refs/heads/master
Project:
chromium
Visibility:
Public.

Description

Roll googletest to 1.8.0. GoogleTest (gtest) and GoogleMock (gmock) are now hosted into the same googletest repository. In order to cope with this, the googletest repository is now sourced at third_party/googletest. The file/directory layout of Google Test is not yet considered stable. To minimize disruption while Google Test stabilizes, Chromium code will be insulated from third_party/googletest. * testing/gtest/include/gtest/ and testing/gmock/include/gmock have been populated with headers that forward into the appropriate locations of third_party/googletest * testing/BUILD.gn has been populated with the targets //testing/gtest(:gtest_main) and //testing/gmock(:gmock_main), which depend on the appropriate //third_party/googletest targets. All Chromium code should keep depending on the targets and headers in testing/{gtest,gmock} for now. BUG=630705 TBR=rkc Review-Url: https://codereview.chromium.org/2779193002 Cr-Commit-Position: refs/heads/master@{#467833} Committed: https://chromium.googlesource.com/chromium/src/+/b539fa1123a19e6499f58582da55ca5af9df94a4

Patch Set 1 : Works locally on linux. #

Patch Set 2 : Works locally on OSX. #

Patch Set 3 : Bring back //build/secondary/testing/{gtest,gmock} so we don't break V8 and PDFium. #

Patch Set 4 : Fix build errors. #

Total comments: 8

Patch Set 5 : Addressed feedback. #

Patch Set 6 : Added OWNERS for testing/gtest and testing/gmock #

Patch Set 7 : Rebase + trial of GN tweaks needed for v8. #

Total comments: 8
Unified diffs Side-by-side diffs Delta from patch set Stats (+408 lines, -50 lines) Patch
M .gitignore View 1 1 chunk +0 lines, -2 lines 0 comments Download
M DEPS View 1 2 3 4 5 6 2 chunks +3 lines, -6 lines 0 comments Download
M base/gtest_prod_util.h View 1 1 chunk +1 line, -1 line 0 comments Download
D build/secondary/testing/gmock/BUILD.gn View 1 2 1 chunk +7 lines, -0 lines 0 comments Download
D build/secondary/testing/gtest/BUILD.gn View 1 2 1 chunk +7 lines, -0 lines 6 comments Download
M device/bluetooth/dbus/fake_bluetooth_media_endpoint_service_provider.h View 1 1 chunk +1 line, -1 line 2 comments Download
M net/socket/sequenced_socket_data_unittest.cc View 1 2 3 1 chunk +2 lines, -2 lines 0 comments Download
A testing/gmock/BUILD.gn View 1 2 3 4 1 chunk +34 lines, -0 lines 0 comments Download
A testing/gmock/OWNERS View 1 2 3 4 5 1 chunk +2 lines, -0 lines 0 comments Download
A testing/gmock/include/gmock/gmock.h View 1 2 3 4 1 chunk +10 lines, -0 lines 0 comments Download
A testing/gmock/include/gmock/gmock-actions.h View 1 2 3 4 1 chunk +10 lines, -0 lines 0 comments Download
A testing/gmock/include/gmock/gmock-generated-function-mockers.h View 1 2 3 4 1 chunk +10 lines, -0 lines 0 comments Download
A testing/gmock/include/gmock/gmock-matchers.h View 1 2 3 4 1 chunk +10 lines, -0 lines 0 comments Download
D testing/gmock_custom/gmock/internal/custom/gmock-port.h View 1 chunk +0 lines, -27 lines 0 comments Download
A testing/gtest/BUILD.gn View 1 2 3 4 5 6 1 chunk +68 lines, -0 lines 0 comments Download
A testing/gtest/OWNERS View 1 2 3 4 5 1 chunk +2 lines, -0 lines 0 comments Download
A testing/gtest/include/gtest/gtest.h View 1 2 3 4 1 chunk +10 lines, -0 lines 0 comments Download
A testing/gtest/include/gtest/gtest-death-test.h View 1 2 3 4 1 chunk +10 lines, -0 lines 0 comments Download
A testing/gtest/include/gtest/gtest-message.h View 1 2 3 4 1 chunk +10 lines, -0 lines 0 comments Download
A testing/gtest/include/gtest/gtest-param-test.h View 1 2 3 4 1 chunk +10 lines, -0 lines 0 comments Download
A testing/gtest/include/gtest/gtest-spi.h View 1 2 3 4 1 chunk +10 lines, -0 lines 0 comments Download
A testing/gtest/include/gtest/gtest_prod.h View 1 2 3 4 1 chunk +10 lines, -0 lines 0 comments Download
M testing/gtest_mac.h View 1 1 chunk +2 lines, -2 lines 0 comments Download
M testing/gtest_mac.mm View 1 1 chunk +3 lines, -3 lines 0 comments Download
M testing/gtest_mac_unittest.mm View 1 1 chunk +1 line, -1 line 0 comments Download
M third_party/.gitignore View 1 2 3 4 5 6 1 chunk +1 line, -0 lines 0 comments Download
A third_party/googletest/BUILD.gn View 1 2 3 4 5 6 1 chunk +150 lines, -0 lines 0 comments Download
A third_party/googletest/OWNERS View 1 2 3 4 1 chunk +4 lines, -0 lines 0 comments Download
A third_party/googletest/README.chromium View 1 2 3 4 5 6 1 chunk +17 lines, -0 lines 0 comments Download
A + third_party/googletest/gmock_custom/gmock/internal/custom/gmock-port.h View 1 chunk +3 lines, -5 lines 0 comments Download

Messages

Total messages: 89 (65 generated)
pwnall
PTAL?
3 years, 8 months ago (2017-04-26 20:42:51 UTC) #31
Nico
This looks basically good, but please add some words about the forwarding headers being permanent ...
3 years, 8 months ago (2017-04-26 20:46:19 UTC) #32
pwnall
thakis: Thank you very much for the quick response! PTAL? https://codereview.chromium.org/2779193002/diff/200001/third_party/googletest/BUILD.gn File third_party/googletest/BUILD.gn (right): https://codereview.chromium.org/2779193002/diff/200001/third_party/googletest/BUILD.gn#newcode40 ...
3 years, 8 months ago (2017-04-26 22:38:24 UTC) #36
Dirk Pranke
I defer to thakis@ here. If you need an extra pair of eyes on the ...
3 years, 8 months ago (2017-04-26 23:42:55 UTC) #38
pwnall
On 2017/04/26 23:42:55, Dirk Pranke wrote: > I defer to thakis@ here. If you need ...
3 years, 8 months ago (2017-04-26 23:49:13 UTC) #39
Nico
lgtm from my side. Thanks much for working on this!
3 years, 8 months ago (2017-04-26 23:59:08 UTC) #41
Dirk Pranke
On 2017/04/26 23:49:13, pwnall wrote: > On 2017/04/26 23:42:55, Dirk Pranke wrote: > > I ...
3 years, 8 months ago (2017-04-27 00:00:26 UTC) #43
pwnall
agl@chromium.org: Please review changes in net/socket/sequenced_socket_data_unittest.cc mcchou@chromium.org: Please review changes in device/bluetooth/dbus/fake_bluetooth_media_endpoint_service_provider.h
3 years, 8 months ago (2017-04-27 01:18:17 UTC) #47
agl
lgtm
3 years, 7 months ago (2017-04-27 14:03:27 UTC) #67
pwnall
rkc: Can you please review the changes in device/bluetooth/dbus/fake_bluetooth_media_endpoint_service_provider.h?
3 years, 7 months ago (2017-04-27 23:46:57 UTC) #69
Nico
I think it's fine to TBR=rkc this. https://codereview.chromium.org/2779193002/diff/340001/device/bluetooth/dbus/fake_bluetooth_media_endpoint_service_provider.h File device/bluetooth/dbus/fake_bluetooth_media_endpoint_service_provider.h (right): https://codereview.chromium.org/2779193002/diff/340001/device/bluetooth/dbus/fake_bluetooth_media_endpoint_service_provider.h#newcode17 device/bluetooth/dbus/fake_bluetooth_media_endpoint_service_provider.h:17: #include "testing/gtest/include/gtest/gtest_prod.h" ...
3 years, 7 months ago (2017-04-28 00:46:44 UTC) #70
pwnall
thakis, dpranke, agl: Thank you very much for the quick reviews! https://codereview.chromium.org/2779193002/diff/340001/device/bluetooth/dbus/fake_bluetooth_media_endpoint_service_provider.h File device/bluetooth/dbus/fake_bluetooth_media_endpoint_service_provider.h (right): ...
3 years, 7 months ago (2017-04-28 00:59:00 UTC) #71
Nico
Landing this is fine. I'd be surprised if gn ignored files not in src though, ...
3 years, 7 months ago (2017-04-28 01:11:29 UTC) #72
pwnall
On 2017/04/28 01:11:29, Nico wrote: > Landing this is fine. I'd be surprised if gn ...
3 years, 7 months ago (2017-04-28 01:52:30 UTC) #74
commit-bot: I haz the power
CQ is trying da patch. Follow status at: https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2779193002/340001
3 years, 7 months ago (2017-04-28 01:54:08 UTC) #77
commit-bot: I haz the power
Committed patchset #7 (id:340001) as https://chromium.googlesource.com/chromium/src/+/b539fa1123a19e6499f58582da55ca5af9df94a4
3 years, 7 months ago (2017-04-28 02:07:49 UTC) #80
skobes
This may have broken the Mac compile: https://build.chromium.org/p/chromium/builders/Mac/builds/26741 FAILED: ced_unittests ced_unittests.unstripped export DEVELOPER_DIR=/b/c/b/mac/src/build/mac_files/Xcode.app; TOOL_VERSION=1487140455 ../../build/toolchain/mac/linker_driver.py ...
3 years, 7 months ago (2017-04-28 02:30:20 UTC) #82
findit-for-me
A revert of this CL (patchset #7 id:340001) has been created in https://codereview.chromium.org/2847043002/ by findit-for-me@appspot.gserviceaccount.com. ...
3 years, 7 months ago (2017-04-28 02:31:15 UTC) #83
pwnall
On 2017/04/28 02:30:20, skobes wrote: > This may have broken the Mac compile: > > ...
3 years, 7 months ago (2017-04-28 02:46:53 UTC) #84
Nico
https://codereview.chromium.org/2779193002/diff/340001/build/secondary/testing/gtest/BUILD.gn File build/secondary/testing/gtest/BUILD.gn (right): https://codereview.chromium.org/2779193002/diff/340001/build/secondary/testing/gtest/BUILD.gn#newcode8 build/secondary/testing/gtest/BUILD.gn:8: # and will be removed as soon as the ...
3 years, 7 months ago (2017-04-28 20:56:23 UTC) #85
pwnall
thakis: Thank you in advance for putting up with my questions. https://codereview.chromium.org/2779193002/diff/340001/build/secondary/testing/gtest/BUILD.gn File build/secondary/testing/gtest/BUILD.gn (right): ...
3 years, 7 months ago (2017-04-29 00:16:26 UTC) #86
Nico
https://codereview.chromium.org/2779193002/diff/340001/build/secondary/testing/gtest/BUILD.gn File build/secondary/testing/gtest/BUILD.gn (right): https://codereview.chromium.org/2779193002/diff/340001/build/secondary/testing/gtest/BUILD.gn#newcode8 build/secondary/testing/gtest/BUILD.gn:8: # and will be removed as soon as the ...
3 years, 7 months ago (2017-05-01 17:52:54 UTC) #87
pwnall
On 2017/05/01 17:52:54, Nico wrote: > https://codereview.chromium.org/2779193002/diff/340001/build/secondary/testing/gtest/BUILD.gn > File build/secondary/testing/gtest/BUILD.gn (right): > > https://codereview.chromium.org/2779193002/diff/340001/build/secondary/testing/gtest/BUILD.gn#newcode8 > ...
3 years, 7 months ago (2017-05-02 01:34:03 UTC) #88
Nico
3 years, 7 months ago (2017-05-02 20:39:51 UTC) #89
Message was sent while issue was closed.
done

On Mon, May 1, 2017 at 9:34 PM, <pwnall@chromium.org> wrote:

> On 2017/05/01 17:52:54, Nico wrote:
> >
> https://codereview.chromium.org/2779193002/diff/340001/
> build/secondary/testing/gtest/BUILD.gn
> > File build/secondary/testing/gtest/BUILD.gn (right):
> >
> >
> https://codereview.chromium.org/2779193002/diff/340001/
> build/secondary/testing/gtest/BUILD.gn#newcode8
> > build/secondary/testing/gtest/BUILD.gn:8: # and will be removed as soon
> as the
> > projects switch off of it.
> > On 2017/04/29 00:16:26, pwnall wrote:
> > > On 2017/04/28 20:56:23, Nico wrote:
> > > > I think we should either just remove this or make it forward to the
> new
> > > > locations. v8 and pdfium can then merge this change the next time
> they
> pull
> > > > chromium. Having this here might confuse gn and it won't pick up the
> new
> > > > BUILD.gn.
> > >
> > > If we remove build/secondary, v8 and pdifum can't merge Chromium until
> they
> > land
> > > a variation of this Google Test migration CL. I was afraid that hard
> > consistency
> > > would be a lot more difficult to achieve than eventual consistency.
> > >
> > > FWIW, according to the bots and local results, GN seems to use
> build/secondary
> > > as a fallback. So, while humans and other tools might get confused, GN
> doesn't
> > > seem to.
> > >
> > > I don't really know how often V8 or PDFium update build/, so I don't
> know if
> > > this is an actual problem. Do you still think we should remove
> build/secondary
> > > in this CL?
> >
> > Ok, let's do this separately.
> >
> > This kind of raises the question: How are pdfium etc use this at all?
> They'll
> > need third_party/googletest/BUILD.gn, so I suppose we'll have to ask
> infra to
> > mirror out third_party/googletest to https://chromium.googlesource.com/
> and
> then
> > those projects will have to deps in both that repo and the actual gtest
> repo?
> >
> >
> https://codereview.chromium.org/2779193002/diff/340001/
> build/secondary/testing/gtest/BUILD.gn#newcode94
> > build/secondary/testing/gtest/BUILD.gn:94: if ((is_mac || is_ios) &&
> > gtest_include_objc_support) {
> > On 2017/04/29 00:16:26, pwnall wrote:
> > > On 2017/04/28 20:56:23, Nico wrote:
> > > > I think this bit is missing from the new BUILD.gn file and it's
> probably
> > > needed.
> > > > ../*test_mac.* should probably move to third_party/gtest too.
> > >
> > > The Mac bits are in testing/gtest/BUILD.gn --
> > > https://codereview.chromium.org/2852613002/diff/40001/
> testing/gtest/BUILD.gn
> > >
> > > I thought it'd be desirable to have third_party/googletest match
> upstream as
> > > much as possible. I think I was wrong, because we're not shy about
> adding
> > files
> > > to other third_party projects, like leveldb.
> >
> > I think in general we try to keep third-party libs unchanged, leveldb is
> a bit
> > of an exception (though there are others). But since this isn't really
> changing
> > gtest but just adding a file to it, maybe it's better. (The plan was
> originally
> > to add gtest_mac to upstream gtest, but upstream didn't like it.)
> >
> > > Moving *test_mac* to googletest
> > > would let me remove a hack that I have to introduce now, so I really
> like
> it.
> > > The hack is at http://crrev.com/2852613002#msg11
> > >
> > > OTOH, gtest_mac.h is #included in a lot of places. Would you be OK with
> moving
> > > it in a separate CL? --
> > https://cs.chromium.org/search/?q=%22testing/gtest_mac.h%22
> >
> > Yes, let's wait with that if it's possible to fix the problem that
> caused the
> > revert without doing it. I thought maybe it's needed to fix that link
> error.
> (If
> > we have to move it, I'd suggest to add a forwarding header for it too,
> like
> for
> > all the other files in regular gtest.)
>
> I think https://crrev.com/2852613002/ is a minimally risky patch, and I
> think
> that the easiest path forward is to land that patch, then move files
> afterwards.
> Moving should be a smaller CL, and should have a smaller impact if it gets
> reverted.
>
> If you agree, can you please LGTM the CL? Based on the comments in this
> CL, I'd
> imagine it's fine to TBR everyone else, after you take a look.
>
> https://codereview.chromium.org/2779193002/
>

-- 
You received this message because you are subscribed to the Google Groups
"Chromium-reviews" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to chromium-reviews+unsubscribe@chromium.org.

Powered by Google App Engine
This is Rietveld 408576698