From owner-svn-src-projects@freebsd.org Mon Mar 11 22:43:25 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 B18B815314DC for ; Mon, 11 Mar 2019 22:43:25 +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 5107887EFB; Mon, 11 Mar 2019 22:43:25 +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 4293C19688; Mon, 11 Mar 2019 22:43:25 +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 x2BMhPNn076419; Mon, 11 Mar 2019 22:43:25 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x2BMhPZL076418; Mon, 11 Mar 2019 22:43:25 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201903112243.x2BMhPZL076418@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Enji Cooper Date: Mon, 11 Mar 2019 22:43:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-projects@freebsd.org Subject: svn commit: r345038 - projects/import-googletest-1.8.1/share/examples/tests/tests/googletest X-SVN-Group: projects X-SVN-Commit-Author: ngie X-SVN-Commit-Paths: projects/import-googletest-1.8.1/share/examples/tests/tests/googletest X-SVN-Commit-Revision: 345038 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 5107887EFB X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.96 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.997,0]; NEURAL_HAM_SHORT(-0.97)[-0.967,0]; NEURAL_HAM_LONG(-1.00)[-1.000,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: Mon, 11 Mar 2019 22:43:25 -0000 Author: ngie Date: Mon Mar 11 22:43:24 2019 New Revision: 345038 URL: https://svnweb.freebsd.org/changeset/base/345038 Log: Tweak the examples integration * Install the samples to the correct directory. * Annotate with comments, like the other directories. * Simplify the for loops; they were only needed for matching which tests require `libgtest` instead of `libgtest_main`. Modified: projects/import-googletest-1.8.1/share/examples/tests/tests/googletest/Makefile Modified: projects/import-googletest-1.8.1/share/examples/tests/tests/googletest/Makefile ============================================================================== --- projects/import-googletest-1.8.1/share/examples/tests/tests/googletest/Makefile Mon Mar 11 22:42:33 2019 (r345037) +++ projects/import-googletest-1.8.1/share/examples/tests/tests/googletest/Makefile Mon Mar 11 22:43:24 2019 (r345038) @@ -1,5 +1,25 @@ # $FreeBSD$ +# +# This Makefile differs from the other examples, in the sense that its purpose +# is to install the upstream provided googletest sample unit tests. +# The release package to use for the tests contained within the directory +# +# This applies to components which rely on ^/projects/release-pkg support +# (see UPDATING XXXXXXXXX / svn revision r298107). +PACKAGE= tests + +# Directory into which the Kyuafile provided by this directory will be +# installed. +# +# This is always a subdirectory of ${TESTSBASE}/. The remainder of the +# path has to match the relative path within the source tree in which +# these files are found modulo the tests/ component at the end. +# +# For example: if this Makefile were in src/bin/cp/tests/, its TESTSDIR +# would point at ${TESTSBASE}/bin/cp/. +TESTSDIR= ${TESTSBASE}/share/examples/tests/googletest + .PATH: ${SRCTOP}/contrib/googletest/googletest/samples GTEST_MAIN_REQ_TESTS+= sample1_unittest @@ -16,18 +36,21 @@ GTEST_MAIN_REQ_TESTS+= sample8_unittest #GTEST_REQ_TESTS+= sample9_unittest GTEST_REQ_TESTS+= sample10_unittest -.for t in ${GTEST_MAIN_REQ_TESTS} -GTESTS+= $t -LIBADD.$t+= gtest_main -SRCS.$t+= $t.cc -.endfor +# List of test programs to build. Note that we can build more than one +# test from a single directory, and this is expected. +GTESTS+= ${GTEST_MAIN_REQ_TESTS} ${GTEST_REQ_TESTS} -.for t in ${GTEST_REQ_TESTS} -GTESTS+= $t +# +.for t in ${GTESTS} +.if ${GTEST_MAIN_REQ_TESTS:M$t} +LIBADD.$t+= gtest_main +.else LIBADD.$t+= gtest +.endif SRCS.$t+= $t.cc .endfor +# Additional sources for sample testcase 1, 2, 4, and 5. SRCS.sample1_unittest+= sample1.cc SRCS.sample2_unittest+= sample2.cc SRCS.sample4_unittest+= sample4.cc