From owner-svn-src-projects@freebsd.org Wed Feb 20 07:29:51 2019 Return-Path: Delivered-To: svn-src-projects@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 33AB614E92C9 for ; Wed, 20 Feb 2019 07:29:51 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id CC08E6AB31; Wed, 20 Feb 2019 07:29:50 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id B3365205F; Wed, 20 Feb 2019 07:29:50 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x1K7TotB026199; Wed, 20 Feb 2019 07:29:50 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x1K7ToXS026198; Wed, 20 Feb 2019 07:29:50 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201902200729.x1K7ToXS026198@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Enji Cooper Date: Wed, 20 Feb 2019 07:29:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-projects@freebsd.org Subject: svn commit: r344345 - projects/import-googletest-1.8.1/lib/googletest/gtest/tests X-SVN-Group: projects X-SVN-Commit-Author: ngie X-SVN-Commit-Paths: projects/import-googletest-1.8.1/lib/googletest/gtest/tests X-SVN-Commit-Revision: 344345 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: CC08E6AB31 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.97 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_LONG(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.97)[-0.968,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-projects@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the src " projects" tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 20 Feb 2019 07:29:51 -0000 Author: ngie Date: Wed Feb 20 07:29:50 2019 New Revision: 344345 URL: https://svnweb.freebsd.org/changeset/base/344345 Log: 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. Modified: projects/import-googletest-1.8.1/lib/googletest/gtest/tests/Makefile Modified: projects/import-googletest-1.8.1/lib/googletest/gtest/tests/Makefile ============================================================================== --- projects/import-googletest-1.8.1/lib/googletest/gtest/tests/Makefile Wed Feb 20 07:21:22 2019 (r344344) +++ projects/import-googletest-1.8.1/lib/googletest/gtest/tests/Makefile Wed Feb 20 07:29:50 2019 (r344345) @@ -4,6 +4,8 @@ .PATH: ${GOOGLETEST_SRCROOT}/src ${GOOGLETEST_SRCROOT}/test +GTESTS+= gtest-death-test_ex_catch_test +GTESTS+= gtest-death-test_ex_nocatch_test GTESTS+= gtest_environment_test GTESTS+= gtest_no_test_unittest GTESTS+= googletest-param-test-test @@ -13,20 +15,29 @@ GTESTS+= gtest_stress_test GTESTS+= gtest_throw_on_failure_ex_test GTESTS+= gtest-unittest-api_test -SRCS.googletest-param-test-test+= googletest-param-test-test.cc -SRCS.googletest-param-test-test+= googletest-param-test2-test.cc -SRCS.gtest_premature_exit_test+= gtest_premature_exit_test.cc - -.for test in ${GTESTS} -# XXX: linker error; no main(..) -#SRCS.${test}= gtest-all.cc -SRCS.${test}?= gtest_main.cc -.endfor - CXXFLAGS+= -I${GOOGLETEST_SRCROOT}/include CXXFLAGS+= -I${GOOGLETEST_SRCROOT} -LIBADD= gtest +gtest-death-test_ex_catch_test.cc gtest-death-test_ex_nocatch_test.cc: googletest-death-test_ex_test.cc + ${CP} ${.ALLSRC} ${.TARGET} + +CXXFLAGS.gtest-death-test_ex_catch_test+= \ + -DGTEST_ENABLE_CATCH_EXCEPTIONS_=1 \ + -fexceptions + +CXXFLAGS.gtest-death-test_ex_nocatch_test+= \ + -DGTEST_ENABLE_CATCH_EXCEPTIONS_=0 \ + -fexceptions + +SRCS.googletest-param-test-test= \ + googletest-param-test-test.cc \ + googletest-param-test2-test.cc + +LIBADD+= gtest + +# XXX: explicitly listing -lpthread is incorrect. src.libnames.mk should be +# handling this. +LIBADD.gtest_stress_test+= pthread # XXX: https://github.com/google/googletest/pull/2119 NO_WERROR=