lib/googletest: Move to a new googletest package

gtest/gmock are not normally used by users unless running the tests,
so they shouldn't be in the utilities package.  Move them to a new
googletest package, to match what we did with ATF/Kyua.

While here, move tests dependencies from tests-all.ucl to tests.ucl,
which is the canonical place for that.

This change adds a new package to the system so, until we have a proper
policy on how to handle this in release/stable branches, it should not
be MFC'd.

MFC after:	never
Reported by:	emaste
Reviewed by:	manu
Sponsored by:	https://www.patreon.com/bsdivy
Differential Revision:	https://reviews.freebsd.org/D53607
This commit is contained in:
Lexi Winter
2025-11-06 14:34:41 +00:00
parent 6a12f58434
commit 0c90c9ad46
6 changed files with 61 additions and 20 deletions
+2
View File
@@ -1,5 +1,7 @@
.include <googletest.test.inc.mk>
PACKAGE?= googletest
GTEST_DIR= ${SRCTOP}/contrib/googletest
GOOGLEMOCK_SRCROOT= ${GTEST_DIR}/googlemock
GOOGLETEST_SRCROOT= ${GTEST_DIR}/googletest
+3
View File
@@ -1,4 +1,7 @@
.PATH: ${SRCTOP}/tests
PACKAGE= tests
KYUAFILE= yes
# Note: we start the gmock_main and gmock tests first since those take up to
+2
View File
@@ -3,6 +3,8 @@
# rather than installing all of them to /usr/tests/lib/googletest
TESTSDIR= ${TESTSBASE}/lib/googletest/${.CURDIR:T}
PACKAGE= tests
# Clang's optimizer spends a really long time on these tests at -O2. Changing
# -O2 to -O1 reduces the -j32 time for lib/googletest/test from 131s to 71s.
# Using -O0 further reduces the time to 29s, and also reduces the disk usage