Compile and install most of the googletest examples
sample9_unittest is not compiled/installed, because it intentionally fails and would result in red test runs until broken to always pass.
This commit is contained in:
parent
4cb64feca8
commit
b244b0102b
@ -440,6 +440,8 @@
|
|||||||
tests
|
tests
|
||||||
atf
|
atf
|
||||||
..
|
..
|
||||||
|
googletest
|
||||||
|
..
|
||||||
plain
|
plain
|
||||||
..
|
..
|
||||||
tap
|
tap
|
||||||
|
@ -1,5 +1,7 @@
|
|||||||
# $FreeBSD$
|
# $FreeBSD$
|
||||||
|
|
||||||
|
.include <src.opts.mk>
|
||||||
|
|
||||||
# Directory into which the Kyuafile provided by this directory will be
|
# Directory into which the Kyuafile provided by this directory will be
|
||||||
# installed.
|
# installed.
|
||||||
#
|
#
|
||||||
@ -21,6 +23,10 @@ TESTS_SUBDIRS+= atf
|
|||||||
TESTS_SUBDIRS+= plain
|
TESTS_SUBDIRS+= plain
|
||||||
TESTS_SUBDIRS+= tap
|
TESTS_SUBDIRS+= tap
|
||||||
|
|
||||||
|
.if ${MK_GOOGLETEST} != no
|
||||||
|
TESTS_SUBDIRS+= googletest
|
||||||
|
.endif
|
||||||
|
|
||||||
# We leave KYUAFILE unset so that bsd.test.mk auto-generates a Kyuafile
|
# We leave KYUAFILE unset so that bsd.test.mk auto-generates a Kyuafile
|
||||||
# for us based on the contents of the TESTS_SUBDIRS line above. The
|
# for us based on the contents of the TESTS_SUBDIRS line above. The
|
||||||
# generated file will tell the tests run-time engine to recurse into the
|
# generated file will tell the tests run-time engine to recurse into the
|
||||||
|
36
share/examples/tests/tests/googletest/Makefile
Normal file
36
share/examples/tests/tests/googletest/Makefile
Normal file
@ -0,0 +1,36 @@
|
|||||||
|
# $FreeBSD$
|
||||||
|
|
||||||
|
.PATH: ${SRCTOP}/contrib/googletest/googletest/samples
|
||||||
|
|
||||||
|
GTEST_MAIN_REQ_TESTS+= sample1_unittest
|
||||||
|
GTEST_MAIN_REQ_TESTS+= sample2_unittest
|
||||||
|
GTEST_MAIN_REQ_TESTS+= sample3_unittest
|
||||||
|
GTEST_MAIN_REQ_TESTS+= sample4_unittest
|
||||||
|
GTEST_MAIN_REQ_TESTS+= sample5_unittest
|
||||||
|
GTEST_MAIN_REQ_TESTS+= sample6_unittest
|
||||||
|
GTEST_MAIN_REQ_TESTS+= sample7_unittest
|
||||||
|
GTEST_MAIN_REQ_TESTS+= sample8_unittest
|
||||||
|
|
||||||
|
# sample9_unittest's `CustomOutputTest.Fails` fails intentionally to illustrate
|
||||||
|
# how output format can be adjusted with command-line parameters.
|
||||||
|
#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
|
||||||
|
|
||||||
|
.for t in ${GTEST_REQ_TESTS}
|
||||||
|
GTESTS+= $t
|
||||||
|
LIBADD.$t+= gtest
|
||||||
|
SRCS.$t+= $t.cc
|
||||||
|
.endfor
|
||||||
|
|
||||||
|
SRCS.sample1_unittest+= sample1.cc
|
||||||
|
SRCS.sample2_unittest+= sample2.cc
|
||||||
|
SRCS.sample4_unittest+= sample4.cc
|
||||||
|
SRCS.sample5_unittest+= sample1.cc
|
||||||
|
|
||||||
|
.include <bsd.test.mk>
|
Loading…
x
Reference in New Issue
Block a user