New issue
Advanced search Search tips

Issue 630299 link

Starred by 3 users

Issue metadata

Status: Fixed
Owner:
Closed: Jul 2016
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: All
Pri: 3
Type: Bug



Sign in to add a comment

Use C++11 mode of gtest and gmock

Project Member Reported by tzik@chromium.org, Jul 21 2016

Issue description

Chromium currently uses C++03 mode of gtest and gmock, which don't support C++11 move semantics.
That prevents us to use move only types wherever we have gmock tests.
It's probably time to start using C++11 mode.
 
Project Member

Comment 1 by bugdroid1@chromium.org, Jul 21 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/10dbcfdfe239cdc2356dbe484f22b64e25b50d78

commit 10dbcfdfe239cdc2356dbe484f22b64e25b50d78
Author: tzik <tzik@chromium.org>
Date: Thu Jul 21 18:23:53 2016

Remove unused include_dir in //ui/event/BUILD.gn

An include_dir setup for gmock in //ui/event/BUILD.gn is unused, and
that prevents to add another include dir to gmock dependencies.
This CL removes it for the preparation.

BUG= 630299 

Review-Url: https://codereview.chromium.org/2171793002
Cr-Commit-Position: refs/heads/master@{#406909}

[modify] https://crrev.com/10dbcfdfe239cdc2356dbe484f22b64e25b50d78/ui/events/BUILD.gn

Comment 2 by danakj@chromium.org, Jul 21 2016

Woa I did not even know such a thing existed.

So far, I've pointed at this: https://github.com/google/googletest/issues/395#issuecomment-125645943
Project Member

Comment 4 by bugdroid1@chromium.org, Jul 22 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/d805a40eb7b1ef6b3069bd94be804793cbff5000

commit d805a40eb7b1ef6b3069bd94be804793cbff5000
Author: tzik <tzik@chromium.org>
Date: Fri Jul 22 03:30:18 2016

Propagate include directories of gtest and gmock to all dependent target

GN and GYP have different setup of include directories of gmock and
gtest. GN propagate include_dir of gtest and gmock to all deps, while
GYP doesn't. This CL changes GYP setting to propagate the setting to all
deps for parity to GN.

BUG= 630299 

Review-Url: https://codereview.chromium.org/2168983002
Cr-Commit-Position: refs/heads/master@{#407026}

[modify] https://crrev.com/d805a40eb7b1ef6b3069bd94be804793cbff5000/testing/gmock.gyp
[modify] https://crrev.com/d805a40eb7b1ef6b3069bd94be804793cbff5000/testing/gtest.gyp

Project Member

Comment 5 by bugdroid1@chromium.org, Jul 22 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/angle/angle/+/585362f4a8845274beb4068bd6c614c573ff292a

commit 585362f4a8845274beb4068bd6c614c573ff292a
Author: Taiju Tsuiki <tzik@google.com>
Date: Thu Jul 21 16:19:25 2016

Remove manual include path setup for gtest and gmock

This should no longer needed after http://crrev.com/d805a40eb7b1ef6b

BUG= chromium:630299 

Change-Id: I2f78a922d873cf1b5809b3454cb0b72267261b97
Reviewed-on: https://chromium-review.googlesource.com/362295
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>

[modify] https://crrev.com/585362f4a8845274beb4068bd6c614c573ff292a/src/tests/tests.gyp

Comment 7 by tzik@chromium.org, Jul 23 2016

Owner: tzik@chromium.org
Status: Fixed (was: Available)
Project Member

Comment 8 by bugdroid1@chromium.org, Jul 25 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/025e90e6a024e92bc35af561b605dcd09719766e

commit 025e90e6a024e92bc35af561b605dcd09719766e
Author: tzik <tzik@chromium.org>
Date: Mon Jul 25 03:27:48 2016

Specify GTEST_LANG_CXX11 to 1 explicitly rather than let gtest detect it

gtest uses __cplusplus value to detect whether C++11 features are available.
However, some of Windows bots has smaller value that C++11 spec defines.
That makes gtest fallback to pre-C++11 mode unnecessarily.
This CL adds GTEST_LANG_CXX11 to force gtest use C++11 mode.

BUG= 630299 

Review-Url: https://codereview.chromium.org/2174213002
Cr-Commit-Position: refs/heads/master@{#407408}

[modify] https://crrev.com/025e90e6a024e92bc35af561b605dcd09719766e/build/secondary/testing/gtest/BUILD.gn
[modify] https://crrev.com/025e90e6a024e92bc35af561b605dcd09719766e/testing/gtest.gyp

Project Member

Comment 9 by bugdroid1@chromium.org, Jul 25 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/v8/v8.git/+/497e10bf654eade4bdb0b90d7e2d81897395148c

commit 497e10bf654eade4bdb0b90d7e2d81897395148c
Author: tzik <tzik@chromium.org>
Date: Mon Jul 25 13:06:21 2016

Use GTEST_LANG_CXX11 in V8

For GYP build, V8 configures gtest and gmock in its //testing, and OTOH for
GN build, it imports BUILD.gn from chromium and uses other configurations
from its own. However, a recent chromium change on the BUILD.gn requires
//testing update too. That prevents //build roll of V8.

BUG= chromium:630299 

Review-Url: https://codereview.chromium.org/2179743002
Cr-Commit-Position: refs/heads/master@{#38021}

[modify] https://crrev.com/497e10bf654eade4bdb0b90d7e2d81897395148c/testing/gmock.gyp
[add] https://crrev.com/497e10bf654eade4bdb0b90d7e2d81897395148c/testing/gmock_custom/gmock/internal/custom/gmock-port.h
[modify] https://crrev.com/497e10bf654eade4bdb0b90d7e2d81897395148c/testing/gtest.gyp

Sign in to add a comment