Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 18 Aug 2023 19:33:24 GMT
From:      Enji Cooper <ngie@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org
Subject:   git: 0c785f06020f - main - Fix GoogleTest 1.14.0 import
Message-ID:  <202308181933.37IJXOQg050369@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch main has been updated by ngie:

URL: https://cgit.FreeBSD.org/src/commit/?id=0c785f06020f3b02e34c97eb27fecd3af8eb2a7b

commit 0c785f06020f3b02e34c97eb27fecd3af8eb2a7b
Author:     Enji Cooper <ngie@FreeBSD.org>
AuthorDate: 2023-08-18 11:28:13 +0000
Commit:     Enji Cooper <ngie@FreeBSD.org>
CommitDate: 2023-08-19 02:33:58 +0000

    Fix GoogleTest 1.14.0 import
    
    - Prune headers and tests no longer installed after the upgrade.
    - Remove GoogleTest-related files when MK_GOOGLETEST == no.
    - Disable `-Werror` with gcc to unbreak the gcc12 CI run with
      `lib/googletest`. Any issues found by g++ will be filed
      upstream and hopefully resolved in a future version.
    - Remove clang -Werror issues which are resolved in version 1.14.0 to
      avoid masking valid issues.
    
    MFC after:      1 week
    MFC with:       28f6c2f292806bf31230a959bc4b19d7081669a7
---
 ObsoleteFiles.inc                        |  16 ++++
 lib/googletest/tests/gmock_main/Makefile |   1 +
 lib/googletest/tests/gtest/Makefile      |   1 +
 lib/googletest/tests/gtest_main/Makefile |   1 +
 share/mk/googletest.test.inc.mk          |  11 ---
 tools/build/mk/OptionalObsoleteFiles.inc | 157 +++++++++++++++----------------
 6 files changed, 94 insertions(+), 93 deletions(-)

diff --git a/ObsoleteFiles.inc b/ObsoleteFiles.inc
index d930b2e52b34..655a81cd900f 100644
--- a/ObsoleteFiles.inc
+++ b/ObsoleteFiles.inc
@@ -51,6 +51,22 @@
 #   xargs -n1 | sort | uniq -d;
 # done
 
+# 20230807: GoogleTest 1.14.0 upgrade.
+OLD_FILES+=usr/include/private/gmock/gmock-generated-actions.h
+OLD_FILES+=usr/include/private/gmock/gmock-generated-function-mockers.h
+OLD_FILES+=usr/include/private/gmock/gmock-generated-matchers.h
+OLD_FILES+=usr/include/private/gmock/gmock-generated-nice-strict.h
+OLD_FILES+=usr/include/private/gmock/internal/gmock-generated-internal-utils.h
+OLD_FILES+=usr/include/private/gtest/internal/gtest-linked_ptr.h
+OLD_FILES+=usr/include/private/gtest/internal/gtest-param-util-generated.h
+OLD_FILES+=usr/include/private/gtest/internal/gtest-tuple.h
+OLD_FILES+=usr/tests/lib/googletest/gmock_main/gmock-generated-actions_test
+OLD_FILES+=usr/tests/lib/googletest/gmock_main/gmock-generated-function-mockers_test
+OLD_FILES+=usr/tests/lib/googletest/gmock_main/gmock-generated-internal-utils_test
+OLD_FILES+=usr/tests/lib/googletest/gmock_main/gmock-generated-matchers_test
+OLD_FILES+=usr/tests/lib/googletest/gmock_main/gmock-matchers_test
+OLD_FILES+=usr/tests/lib/googletest/gtest_main/googletest-linked-ptr-test
+
 # 20230807: Removal of the ath(4) AHB bus-frontend for MIPS
 OLD_FILES+=usr/share/man/man4/ath_ahb.4
 OLD_FILES+=usr/share/man/man4/ath_pci.4
diff --git a/lib/googletest/tests/gmock_main/Makefile b/lib/googletest/tests/gmock_main/Makefile
index 737c64b653a4..7523b585ac2c 100644
--- a/lib/googletest/tests/gmock_main/Makefile
+++ b/lib/googletest/tests/gmock_main/Makefile
@@ -34,5 +34,6 @@ CXXFLAGS.clang+=	-Wno-error=inconsistent-missing-override
 CXXFLAGS.clang+=	-Wno-error=missing-variable-declarations
 CXXFLAGS.clang+=	-Wno-error=sign-compare
 CXXFLAGS.clang+=	-Wno-error=unused-parameter
+MK_WERROR.gcc=		no
 
 .include <bsd.test.mk>
diff --git a/lib/googletest/tests/gtest/Makefile b/lib/googletest/tests/gtest/Makefile
index e95101738322..0000167dfe70 100644
--- a/lib/googletest/tests/gtest/Makefile
+++ b/lib/googletest/tests/gtest/Makefile
@@ -36,6 +36,7 @@ SRCS.googletest-param-test-test=       \
 LIBADD+=	gtest
 
 CXXFLAGS.clang+=	-Wno-error=missing-variable-declarations
+MK_WERROR.gcc=		no
 
 # XXX: explicitly listing -lpthread is incorrect. src.libnames.mk should be
 #      handling this.
diff --git a/lib/googletest/tests/gtest_main/Makefile b/lib/googletest/tests/gtest_main/Makefile
index 49831d7513af..3124042f8b95 100644
--- a/lib/googletest/tests/gtest_main/Makefile
+++ b/lib/googletest/tests/gtest_main/Makefile
@@ -38,5 +38,6 @@ LIBADD.gtest_unittest+=		pthread
 
 CXXFLAGS.clang+=	-Wno-error=missing-variable-declarations
 CXXFLAGS.clang+=	-Wno-error=unused-but-set-variable
+MK_WERROR.gcc=		no
 
 .include <bsd.test.mk>
diff --git a/share/mk/googletest.test.inc.mk b/share/mk/googletest.test.inc.mk
index 2034e12eaf30..05415775448b 100644
--- a/share/mk/googletest.test.inc.mk
+++ b/share/mk/googletest.test.inc.mk
@@ -1,4 +1,3 @@
-
 GTESTS_CXXFLAGS+= -DGTEST_HAS_POSIX_RE=1
 GTESTS_CXXFLAGS+= -DGTEST_HAS_PTHREAD=1
 GTESTS_CXXFLAGS+= -DGTEST_HAS_STREAM_REDIRECTION=1
@@ -6,16 +5,6 @@ GTESTS_CXXFLAGS+= -frtti
 
 .include <bsd.compiler.mk>
 
-.if ${COMPILER_TYPE} == "clang" && ${COMPILER_VERSION} >= 100000
-# Required until googletest is upgraded to a more recent version (after
-# upstream commit efecb0bfa687cf87836494f5d62868485c00fb66).
-GTESTS_CXXFLAGS+= -Wno-deprecated-copy
-
-# Required until googletest is upgraded to a more recent version (after
-# upstream commit d44b137fd104dfffdcdea103f7de11b9eccc45c2).
-GTESTS_CXXFLAGS+= -Wno-signed-unsigned-wchar
-.endif
-
 # XXX: src.libnames.mk should handle adding this directory for libgtest's,
 # libgmock's, etc, headers.
 CXXFLAGS+=	-I${DESTDIR}${INCLUDEDIR}/private
diff --git a/tools/build/mk/OptionalObsoleteFiles.inc b/tools/build/mk/OptionalObsoleteFiles.inc
index d358af7bf588..470f18346dc5 100644
--- a/tools/build/mk/OptionalObsoleteFiles.inc
+++ b/tools/build/mk/OptionalObsoleteFiles.inc
@@ -2125,103 +2125,91 @@ OLD_DIRS+=usr/tests/usr.bin/dc
 .endif
 
 .if ${MK_GOOGLETEST} == no
-OLD_FILES+=usr/include/gmock/gmock-actions.h
-OLD_FILES+=usr/include/gmock/gmock-cardinalities.h
-OLD_FILES+=usr/include/gmock/gmock-generated-actions.h
-OLD_FILES+=usr/include/gmock/gmock-generated-function-mockers.h
-OLD_FILES+=usr/include/gmock/gmock-generated-matchers.h
-OLD_FILES+=usr/include/gmock/gmock-generated-nice-strict.h
-OLD_FILES+=usr/include/gmock/gmock-matchers.h
-OLD_FILES+=usr/include/gmock/gmock-more-actions.h
-OLD_FILES+=usr/include/gmock/gmock-more-matchers.h
-OLD_FILES+=usr/include/gmock/gmock-spec-builders.h
-OLD_FILES+=usr/include/gmock/gmock.h
-OLD_FILES+=usr/include/gmock/internal/custom/gmock-generated-actions.h
-OLD_FILES+=usr/include/gmock/internal/custom/gmock-matchers.h
-OLD_FILES+=usr/include/gmock/internal/custom/gmock-port.h
-OLD_FILES+=usr/include/gmock/internal/gmock-generated-internal-utils.h
-OLD_FILES+=usr/include/gmock/internal/gmock-internal-utils.h
-OLD_FILES+=usr/include/gmock/internal/gmock-port.h
-OLD_DIRS+=usr/include/gmock
-OLD_FILES+=usr/include/gtest/gtest_pred_impl.h
-OLD_FILES+=usr/include/gtest/gtest_prod.h
-OLD_FILES+=usr/include/gtest/gtest-death-test.h
-OLD_FILES+=usr/include/gtest/gtest-message.h
-OLD_FILES+=usr/include/gtest/gtest-param-test.h
-OLD_FILES+=usr/include/gtest/gtest-printers.h
-OLD_FILES+=usr/include/gtest/gtest-spi.h
-OLD_FILES+=usr/include/gtest/gtest-test-part.h
-OLD_FILES+=usr/include/gtest/gtest-typed-test.h
-OLD_FILES+=usr/include/gtest/gtest.h
-OLD_FILES+=usr/include/gtest/internal/custom/gtest-port.h
-OLD_FILES+=usr/include/gtest/internal/custom/gtest-printers.h
-OLD_FILES+=usr/include/gtest/internal/custom/gtest.h
-OLD_FILES+=usr/include/gtest/internal/gtest-death-test-internal.h
-OLD_FILES+=usr/include/gtest/internal/gtest-filepath.h
-OLD_FILES+=usr/include/gtest/internal/gtest-internal.h
-OLD_FILES+=usr/include/gtest/internal/gtest-linked_ptr.h
-OLD_FILES+=usr/include/gtest/internal/gtest-param-util-generated.h
-OLD_FILES+=usr/include/gtest/internal/gtest-param-util.h
-OLD_FILES+=usr/include/gtest/internal/gtest-port-arch.h
-OLD_FILES+=usr/include/gtest/internal/gtest-port.h
-OLD_FILES+=usr/include/gtest/internal/gtest-string.h
-OLD_FILES+=usr/include/gtest/internal/gtest-tuple.h
-OLD_FILES+=usr/include/gtest/internal/gtest-type-util.h
-OLD_DIRS+=usr/include/gtest
-OLD_FILES+=usr/lib/libprivategmock_main.a
-OLD_FILES+=usr/lib/libprivategmock_main.so
-OLD_LIBS+=usr/lib/libprivategmock_main.so.0
-OLD_FILES+=usr/lib/libprivategmock_main_p.a
+OLD_FILES+=usr/include/private/gmock/gmock-actions.h
+OLD_FILES+=usr/include/private/gmock/gmock-cardinalities.h
+OLD_FILES+=usr/include/private/gmock/gmock-function-mocker.h
+OLD_FILES+=usr/include/private/gmock/gmock-matchers.h
+OLD_FILES+=usr/include/private/gmock/gmock-more-actions.h
+OLD_FILES+=usr/include/private/gmock/gmock-more-matchers.h
+OLD_FILES+=usr/include/private/gmock/gmock-nice-strict.h
+OLD_FILES+=usr/include/private/gmock/gmock-spec-builders.h
+OLD_FILES+=usr/include/private/gmock/gmock.h
+OLD_FILES+=usr/include/private/gmock/internal/custom/gmock-generated-actions.h
+OLD_FILES+=usr/include/private/gmock/internal/custom/gmock-matchers.h
+OLD_FILES+=usr/include/private/gmock/internal/custom/gmock-port.h
+OLD_FILES+=usr/include/private/gmock/internal/gmock-internal-utils.h
+OLD_FILES+=usr/include/private/gmock/internal/gmock-port.h
+OLD_FILES+=usr/include/private/gmock/internal/gmock-pp.h
+OLD_FILES+=usr/include/private/gtest/gtest-assertion-result.h
+OLD_FILES+=usr/include/private/gtest/gtest-death-test.h
+OLD_FILES+=usr/include/private/gtest/gtest-matchers.h
+OLD_FILES+=usr/include/private/gtest/gtest-message.h
+OLD_FILES+=usr/include/private/gtest/gtest-param-test.h
+OLD_FILES+=usr/include/private/gtest/gtest-printers.h
+OLD_FILES+=usr/include/private/gtest/gtest-spi.h
+OLD_FILES+=usr/include/private/gtest/gtest-test-part.h
+OLD_FILES+=usr/include/private/gtest/gtest-typed-test.h
+OLD_FILES+=usr/include/private/gtest/gtest.h
+OLD_FILES+=usr/include/private/gtest/gtest_pred_impl.h
+OLD_FILES+=usr/include/private/gtest/gtest_prod.h
+OLD_FILES+=usr/include/private/gtest/internal/custom/gtest-port.h
+OLD_FILES+=usr/include/private/gtest/internal/custom/gtest-printers.h
+OLD_FILES+=usr/include/private/gtest/internal/custom/gtest.h
+OLD_FILES+=usr/include/private/gtest/internal/gtest-death-test-internal.h
+OLD_FILES+=usr/include/private/gtest/internal/gtest-filepath.h
+OLD_FILES+=usr/include/private/gtest/internal/gtest-internal.h
+OLD_FILES+=usr/include/private/gtest/internal/gtest-param-util.h
+OLD_FILES+=usr/include/private/gtest/internal/gtest-port-arch.h
+OLD_FILES+=usr/include/private/gtest/internal/gtest-port.h
+OLD_FILES+=usr/include/private/gtest/internal/gtest-string.h
+OLD_FILES+=usr/include/private/gtest/internal/gtest-type-util.h
 OLD_FILES+=usr/lib/libprivategmock.a
-OLD_FILES+=usr/lib/libprivategmock.so
-OLD_LIBS+=usr/lib/libprivategmock.so.0
 OLD_FILES+=usr/lib/libprivategmock_p.a
-OLD_FILES+=usr/lib/libprivategtest_main.a
-OLD_FILES+=usr/lib/libprivategtest_main.so
-OLD_LIBS+=usr/lib/libprivategtest_main.so.0
-OLD_FILES+=usr/lib/libprivategtest_main_p.a
+OLD_LIBS+=usr/lib/libprivategmock.so
+OLD_LIBS+=usr/lib/libprivategmock.so.0
+OLD_FILES+=usr/lib/libprivategmock_main.a
+OLD_FILES+=usr/lib/libprivategmock_main_p.a
+OLD_LIBS+=usr/lib/libprivategmock_main.so
+OLD_LIBS+=usr/lib/libprivategmock_main.so.0
 OLD_FILES+=usr/lib/libprivategtest.a
-OLD_FILES+=usr/lib/libprivategtest.so
-OLD_LIBS+=usr/lib/libprivategtest.so.0
 OLD_FILES+=usr/lib/libprivategtest_p.a
-OLD_FILES+=usr/tests/lib/googletest/gmock/gmock_stress_test
+OLD_LIBS+=usr/lib/libprivategtest.so
+OLD_LIBS+=usr/lib/libprivategtest.so.0
+OLD_FILES+=usr/lib/libprivategtest_main.a
+OLD_FILES+=usr/lib/libprivategtest_main_p.a
+OLD_LIBS+=usr/lib/libprivategtest_main.so
+OLD_LIBS+=usr/lib/libprivategtest_main.so.0
+OLD_FILES+=usr/tests/lib/googletest/Kyuafile
 OLD_FILES+=usr/tests/lib/googletest/gmock/Kyuafile
-OLD_DIRS+=usr/tests/lib/googletest/gmock
-OLD_FILES+=usr/tests/lib/googletest/gmock_main/gmock_ex_test
-OLD_FILES+=usr/tests/lib/googletest/gmock_main/gmock_link_test
-OLD_FILES+=usr/tests/lib/googletest/gmock_main/gmock_test
+OLD_FILES+=usr/tests/lib/googletest/gmock/gmock_stress_test
+OLD_FILES+=usr/tests/lib/googletest/gmock_main/Kyuafile
 OLD_FILES+=usr/tests/lib/googletest/gmock_main/gmock-actions_test
 OLD_FILES+=usr/tests/lib/googletest/gmock_main/gmock-cardinalities_test
-OLD_FILES+=usr/tests/lib/googletest/gmock_main/gmock-ex_test
-OLD_FILES+=usr/tests/lib/googletest/gmock_main/gmock-generated-actions_test
-OLD_FILES+=usr/tests/lib/googletest/gmock_main/gmock-generated-function-mockers_test
-OLD_FILES+=usr/tests/lib/googletest/gmock_main/gmock-generated-internal-utils_test
-OLD_FILES+=usr/tests/lib/googletest/gmock_main/gmock-generated-matchers_test
+OLD_FILES+=usr/tests/lib/googletest/gmock_main/gmock-function-mocker_test
 OLD_FILES+=usr/tests/lib/googletest/gmock_main/gmock-internal-utils_test
-OLD_FILES+=usr/tests/lib/googletest/gmock_main/gmock-matchers_test
+OLD_FILES+=usr/tests/lib/googletest/gmock_main/gmock-matchers-arithmetic_test
+OLD_FILES+=usr/tests/lib/googletest/gmock_main/gmock-matchers-comparisons_test
+OLD_FILES+=usr/tests/lib/googletest/gmock_main/gmock-matchers-containers_test
+OLD_FILES+=usr/tests/lib/googletest/gmock_main/gmock-matchers-misc_test
 OLD_FILES+=usr/tests/lib/googletest/gmock_main/gmock-more-actions_test
 OLD_FILES+=usr/tests/lib/googletest/gmock_main/gmock-nice-strict_test
 OLD_FILES+=usr/tests/lib/googletest/gmock_main/gmock-port_test
 OLD_FILES+=usr/tests/lib/googletest/gmock_main/gmock-spec-builders_test
-OLD_FILES+=usr/tests/lib/googletest/gmock_main/Kyuafile
-OLD_DIRS+=usr/tests/lib/googletest/gmock_main
+OLD_FILES+=usr/tests/lib/googletest/gmock_main/gmock_ex_test
+OLD_FILES+=usr/tests/lib/googletest/gmock_main/gmock_link_test
+OLD_FILES+=usr/tests/lib/googletest/gmock_main/gmock_test
+OLD_FILES+=usr/tests/lib/googletest/gtest/Kyuafile
 OLD_FILES+=usr/tests/lib/googletest/gtest/googletest-param-test-test
-OLD_FILES+=usr/tests/lib/googletest/gtest/gtest_all_test
+OLD_FILES+=usr/tests/lib/googletest/gtest/gtest-unittest-api_test
 OLD_FILES+=usr/tests/lib/googletest/gtest/gtest_environment_test
 OLD_FILES+=usr/tests/lib/googletest/gtest/gtest_no_test_unittest
 OLD_FILES+=usr/tests/lib/googletest/gtest/gtest_premature_exit_test
 OLD_FILES+=usr/tests/lib/googletest/gtest/gtest_repeat_test
 OLD_FILES+=usr/tests/lib/googletest/gtest/gtest_stress_test
 OLD_FILES+=usr/tests/lib/googletest/gtest/gtest_throw_on_failure_ex_test
-OLD_FILES+=usr/tests/lib/googletest/gtest/gtest-death-test_ex_catch_test
-OLD_FILES+=usr/tests/lib/googletest/gtest/gtest-death-test_ex_nocatch_test
-OLD_FILES+=usr/tests/lib/googletest/gtest/gtest-unittest-api_test
-OLD_FILES+=usr/tests/lib/googletest/gtest/Kyuafile
-OLD_DIRS+=usr/tests/lib/googletest/gtest
 OLD_FILES+=usr/tests/lib/googletest/gtest_main/Kyuafile
 OLD_FILES+=usr/tests/lib/googletest/gtest_main/googletest-death-test-test
 OLD_FILES+=usr/tests/lib/googletest/gtest_main/googletest-filepath-test
-OLD_FILES+=usr/tests/lib/googletest/gtest_main/googletest-linked-ptr-test
 OLD_FILES+=usr/tests/lib/googletest/gtest_main/googletest-listener-test
 OLD_FILES+=usr/tests/lib/googletest/gtest_main/googletest-message-test
 OLD_FILES+=usr/tests/lib/googletest/gtest_main/googletest-options-test
@@ -2229,7 +2217,6 @@ OLD_FILES+=usr/tests/lib/googletest/gtest_main/googletest-port-test
 OLD_FILES+=usr/tests/lib/googletest/gtest_main/googletest-printers-test
 OLD_FILES+=usr/tests/lib/googletest/gtest_main/googletest-test-part-test
 OLD_FILES+=usr/tests/lib/googletest/gtest_main/gtest-typed-test_test
-OLD_FILES+=usr/tests/lib/googletest/gtest_main/gtest_help_test_
 OLD_FILES+=usr/tests/lib/googletest/gtest_main/gtest_main_unittest
 OLD_FILES+=usr/tests/lib/googletest/gtest_main/gtest_pred_impl_unittest
 OLD_FILES+=usr/tests/lib/googletest/gtest_main/gtest_prod_test
@@ -2237,14 +2224,9 @@ OLD_FILES+=usr/tests/lib/googletest/gtest_main/gtest_skip_in_environment_setup_t
 OLD_FILES+=usr/tests/lib/googletest/gtest_main/gtest_skip_test
 OLD_FILES+=usr/tests/lib/googletest/gtest_main/gtest_sole_header_test
 OLD_FILES+=usr/tests/lib/googletest/gtest_main/gtest_unittest
-OLD_FILES+=usr/tests/lib/googletest/gtest_main/gtest_xml_outfile1_test_
-OLD_FILES+=usr/tests/lib/googletest/gtest_main/gtest_xml_outfile2_test_
-OLD_DIRS+=usr/tests/lib/googletest/gtest_main
-OLD_FILES+=usr/tests/lib/googletest/Kyuafile
-OLD_DIRS+=usr/tests/lib/googletest/
 OLD_FILES+=usr/tests/share/examples/tests/googletest/Kyuafile
-OLD_FILES+=usr/tests/share/examples/tests/googletest/sample1_unittest
 OLD_FILES+=usr/tests/share/examples/tests/googletest/sample10_unittest
+OLD_FILES+=usr/tests/share/examples/tests/googletest/sample1_unittest
 OLD_FILES+=usr/tests/share/examples/tests/googletest/sample2_unittest
 OLD_FILES+=usr/tests/share/examples/tests/googletest/sample3_unittest
 OLD_FILES+=usr/tests/share/examples/tests/googletest/sample4_unittest
@@ -2252,6 +2234,17 @@ OLD_FILES+=usr/tests/share/examples/tests/googletest/sample5_unittest
 OLD_FILES+=usr/tests/share/examples/tests/googletest/sample6_unittest
 OLD_FILES+=usr/tests/share/examples/tests/googletest/sample7_unittest
 OLD_FILES+=usr/tests/share/examples/tests/googletest/sample8_unittest
+OLD_DIRS+=usr/include/private/gmock/
+OLD_DIRS+=usr/include/private/gmock/internal
+OLD_DIRS+=usr/include/private/gmock/internal/custom
+OLD_DIRS+=usr/include/private/gtest/
+OLD_DIRS+=usr/include/private/gtest/internal
+OLD_DIRS+=usr/include/private/gtest/internal/custom
+OLD_DIRS+=usr/tests/lib/googletest
+OLD_DIRS+=usr/tests/lib/googletest/gmock
+OLD_DIRS+=usr/tests/lib/googletest/gmock_main
+OLD_DIRS+=usr/tests/lib/googletest/gtest
+OLD_DIRS+=usr/tests/lib/googletest/gtest_main
 OLD_DIRS+=usr/tests/share/examples/tests/googletest
 .endif
 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202308181933.37IJXOQg050369>