Commit graph

12 commits

Author SHA1 Message Date
Warner Losh d0b2dbfa0e Remove $FreeBSD$: one-line sh pattern
Remove /^\s*#[#!]?\s*\$FreeBSD\$.*$\n/
2023-08-16 11:55:03 -06:00
Enji Cooper 28f6c2f292 Import GoogleTest 1.14.0
GoogleTest 1.14.0 now requires C++14 to build. Change
`googletest.test.inc.mk` to reflect this requirement.

Adjust the build integration logic to handle the new version of
GoogleTest (add/remove headers/sources as needed).

Tighten down warnings via `CXXFLAGS.clang` instead of ignoring all
warnings. Some new warnings snuck in after I did my last round of fix
submissions upstream.

Also address some overlinking added in the previous version import by
removing superfluous libraries.

===============================

Expect WhenDynamicCastToTest.AmbiguousCast to fail

This change reapplies the expected failure from 1.10.0.

Ref: https://github.com/google/googletest/issues/2172

MFC after:	2 weeks
Reviewed by:	asomers, emaste
Differential Revision:	https://reviews.freebsd.org/D41399

Merge commit '8ef491440fcaec96f899d73e08873426c78583a4' into googletest-v1.14.0-import
2023-08-10 02:32:33 -07:00
Alex Richardson 2ed3236082 Major improvement to build parallelism for googletest internal tests
Currently the googletest internal tests build after the matching library.
However, each of these is serialized at the top level makefile.
Additionally some of the tests (e.g. the gmock-matches-test) take up to
90 seconds to build with clang -O2. Having to wait for this test to
complete before continuing to the next directory seriously slows down the
parllelism of a -j32 build.
Before this change running `make -C lib/googletest -j32 -s` in buildenv
took 202 seconds, now it's 153 due to improved parallelism.

Reviewed By:	emaste (no objection)
Differential Revision: https://reviews.freebsd.org/D26748
2020-10-19 19:50:57 +00:00
Kyle Evans b4af4f93c6 gtest: link against libregex for GNU extensions
gtest tests want to use \w ([[:alnum:]]) at the very least, which was
causing them to fail after r363679.

Start linking against libregex so that this shorthand is implemented.

PR:		248452
2020-08-04 02:18:24 +00:00
Enji Cooper 7b42ad1434 Reword the comment above NO_WERROR 2019-02-21 06:51:35 +00:00
Enji Cooper c1bcc48b3c Use gmock/gtest headers when PRIVATELIB is defined
The move to /usr/include/private prefixed paths seems to require a bit more
effort in order to compile programs.

Install the headers to /usr/include/private/g{mock,test}/... and automatically
include /usr/include/private in GTESTS_CXXFLAGS to make compilation seamless. I
will work on the more global problem later with @bdrewery.
2019-02-21 04:47:44 +00:00
Enji Cooper 7481b4234c Build death tests programmatically
The previous code hardcoded the death test build definitions in a duplicative
manner. The new code doesn't.
2019-02-21 03:37:31 +00:00
Enji Cooper dae8f2468d Fix gtest test compilation and build more tests
My previous work to integrate these tests was incomplete/incorrect, because I
misunderstood how the cmake macros worked.

This addresses items with the gtest tests, which in turn fixes test compilation
and adds more tests which I had previously missed.

Due to an unknown issue with gtest_stress_test, I had to add pthread to LIBADD,
even though I shouldn't have added it to that (it was failing to link -lpthread
to libprivategtest.a). Add a XXX comment to note that something's awry there
and deserves additional investigation.
2019-02-20 07:29:50 +00:00
Enji Cooper fedec5d9ee Sprinkle ${HAS_TESTS} in Makefiles
While here, reindent `SUBDIR.${MK_TESTS}`
2019-02-20 06:03:21 +00:00
Enji Cooper 988a9f7e39 Use GTESTS instead of PLAIN_TESTS_CXX
The former is from googletest.test.mk, whereas the latter is from plain.test.mk.

As noted in r344328, Kyua will adopt more native GoogleTest support. Thus, it's
more desirable to make the test interface more of an opaque blackbox for the
testcase implementer.
2019-02-20 01:11:30 +00:00
Enji Cooper fd89d5ad05 Compile the tests without -Werror for now
I'm working on resolving the issue upstream on github
2019-02-13 05:41:04 +00:00
Enji Cooper f3c5273d31 Merge build glue for libraries and tests done on github
I need to doublecheck my work vs the port, but I believe that this covers the
initial integration of all upstream tests.

Ref: https://github.com/ngie-eign/freebsd/tree/googletest-integration
2019-02-13 04:58:15 +00:00