From owner-svn-src-projects@freebsd.org  Wed Feb 20 01:09:04 2019
Return-Path: <owner-svn-src-projects@freebsd.org>
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 C6C7714E03F2
 for <svn-src-projects@mailman.ysv.freebsd.org>;
 Wed, 20 Feb 2019 01:09:04 +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 67A4D8501A;
 Wed, 20 Feb 2019 01:09:04 +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 5B0C325E63;
 Wed, 20 Feb 2019 01:09:04 +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 x1K194WO027730;
 Wed, 20 Feb 2019 01:09:04 GMT (envelope-from ngie@FreeBSD.org)
Received: (from ngie@localhost)
 by repo.freebsd.org (8.15.2/8.15.2/Submit) id x1K193iH027727;
 Wed, 20 Feb 2019 01:09:03 GMT (envelope-from ngie@FreeBSD.org)
Message-Id: <201902200109.x1K193iH027727@repo.freebsd.org>
X-Authentication-Warning: repo.freebsd.org: ngie set sender to
 ngie@FreeBSD.org using -f
From: Enji Cooper <ngie@FreeBSD.org>
Date: Wed, 20 Feb 2019 01:09:03 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-projects@freebsd.org
Subject: svn commit: r344328 - projects/import-googletest-1.8.1/share/mk
X-SVN-Group: projects
X-SVN-Commit-Author: ngie
X-SVN-Commit-Paths: projects/import-googletest-1.8.1/share/mk
X-SVN-Commit-Revision: 344328
X-SVN-Commit-Repository: base
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-Rspamd-Queue-Id: 67A4D8501A
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_SHORT(-0.97)[-0.968,0];
 NEURAL_HAM_LONG(-1.00)[-0.999,0]
X-BeenThere: svn-src-projects@freebsd.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: "SVN commit messages for the src &quot; projects&quot;
 tree" <svn-src-projects.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-projects>, 
 <mailto:svn-src-projects-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-projects/>
List-Post: <mailto:svn-src-projects@freebsd.org>
List-Help: <mailto:svn-src-projects-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-projects>, 
 <mailto:svn-src-projects-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Wed, 20 Feb 2019 01:09:05 -0000

Author: ngie
Date: Wed Feb 20 01:09:03 2019
New Revision: 344328
URL: https://svnweb.freebsd.org/changeset/base/344328

Log:
  Add googletest.test.mk and integrate into bsd.test.mk
  
  googletest.test.mk is a rudimentary wrapper around the plain test interface
  (for now), which only supports C++ programs, specified by the `GTESTS`
  variable.
  
  In the future, kyua will support gtests in a more native manner.

Added:
  projects/import-googletest-1.8.1/share/mk/googletest.test.mk   (contents, props changed)
Modified:
  projects/import-googletest-1.8.1/share/mk/Makefile
  projects/import-googletest-1.8.1/share/mk/bsd.test.mk

Modified: projects/import-googletest-1.8.1/share/mk/Makefile
==============================================================================
--- projects/import-googletest-1.8.1/share/mk/Makefile	Wed Feb 20 00:40:57 2019	(r344327)
+++ projects/import-googletest-1.8.1/share/mk/Makefile	Wed Feb 20 01:09:03 2019	(r344328)
@@ -73,6 +73,7 @@ FILESDIR=	${BINDIR}/mk
 
 .if ${MK_TESTS} != "no"
 FILES+=	atf.test.mk
+FILES+=	googletest.test.mk
 FILES+=	plain.test.mk
 FILES+=	suite.test.mk
 FILES+=	tap.test.mk

Modified: projects/import-googletest-1.8.1/share/mk/bsd.test.mk
==============================================================================
--- projects/import-googletest-1.8.1/share/mk/bsd.test.mk	Wed Feb 20 00:40:57 2019	(r344327)
+++ projects/import-googletest-1.8.1/share/mk/bsd.test.mk	Wed Feb 20 01:09:03 2019	(r344328)
@@ -63,6 +63,7 @@ _TESTS=
 
 # Pull in the definitions of all supported test interfaces.
 .include <atf.test.mk>
+.include <googletest.test.mk>
 .include <plain.test.mk>
 .include <tap.test.mk>
 

Added: projects/import-googletest-1.8.1/share/mk/googletest.test.mk
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ projects/import-googletest-1.8.1/share/mk/googletest.test.mk	Wed Feb 20 01:09:03 2019	(r344328)
@@ -0,0 +1,38 @@
+# $FreeBSD$
+#
+# You must include bsd.test.mk instead of this file from your Makefile.
+#
+# Logic to build and install GoogleTest based test programs.
+#
+# GoogleTest is a C++ test framework, thus, it does not describe/articulate how
+# to write tests in other languages, e.g., C or shell, unlike the ATF, plain,
+# and TAP raw test interfaces.
+#
+# For now this is a thin wrapper around the `plain` test interface, but in the
+# future this will rely on a newer version of kyua which will integrate in
+# GoogleTest support.
+
+.if !target(__<bsd.test.mk>__)
+.error googletest.test.mk cannot be included directly.
+.endif
+
+# List of GoogleTest test programs to build.
+#
+# Programs listed here are built according to the semantics of bsd.progs.mk for
+# PROGS_CXX.
+#
+# Test programs registered in this manner are set to be installed into TESTSDIR
+# (which should be overridden by the Makefile) and are not required to provide a
+# manpage.
+GTESTS?=
+
+.if !empty(GTESTS)
+PROGS_CXX+= ${GTESTS}
+_TESTS+= ${GTESTS}
+.for _T in ${GTESTS}
+BINDIR.${_T}= ${TESTSDIR}
+MAN.${_T}?= # empty
+SRCS.${_T}?= ${_T}.cc
+TEST_INTERFACE.${_T}= plain
+.endfor
+.endif