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.
This commit is contained in:
@@ -73,6 +73,7 @@ FILESDIR= ${BINDIR}/mk
|
|||||||
|
|
||||||
.if ${MK_TESTS} != "no"
|
.if ${MK_TESTS} != "no"
|
||||||
FILES+= atf.test.mk
|
FILES+= atf.test.mk
|
||||||
|
FILES+= googletest.test.mk
|
||||||
FILES+= plain.test.mk
|
FILES+= plain.test.mk
|
||||||
FILES+= suite.test.mk
|
FILES+= suite.test.mk
|
||||||
FILES+= tap.test.mk
|
FILES+= tap.test.mk
|
||||||
|
|||||||
@@ -63,6 +63,7 @@ _TESTS=
|
|||||||
|
|
||||||
# Pull in the definitions of all supported test interfaces.
|
# Pull in the definitions of all supported test interfaces.
|
||||||
.include <atf.test.mk>
|
.include <atf.test.mk>
|
||||||
|
.include <googletest.test.mk>
|
||||||
.include <plain.test.mk>
|
.include <plain.test.mk>
|
||||||
.include <tap.test.mk>
|
.include <tap.test.mk>
|
||||||
|
|
||||||
|
|||||||
@@ -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
|
||||||
Reference in New Issue
Block a user