diff options
author | jmmv <jmmv@FreeBSD.org> | 2013-12-27 22:00:22 +0000 |
---|---|---|
committer | jmmv <jmmv@FreeBSD.org> | 2013-12-27 22:00:22 +0000 |
commit | e125f95c9c257e17bc2724cf2f7bdb2a5e1f367c (patch) | |
tree | 1119ed400ee859c1a442dea4edd3494fbc8a2f21 /share/mk/plain.test.mk | |
parent | 33f454b5c1f0354b8354b4536b45d3d1d1cc8982 (diff) | |
download | FreeBSD-src-e125f95c9c257e17bc2724cf2f7bdb2a5e1f367c.zip FreeBSD-src-e125f95c9c257e17bc2724cf2f7bdb2a5e1f367c.tar.gz |
Split and extend bsd.test.mk into {atf,plain,tap}.test.mk.
This is a MFC of:
- r256761 Clearly split the logic to build ATF and plain tests apart.
- r256762 Add the automatic generation of Atffile files.
- r256763 Add the automatic generation of Kyuafile files.
- r256764 Plug atf-run into the 'test' target.
- r256765 Plug kyua into the 'test' target.
- r257096 Move the TESTSBASE definition to bsd.own.mk.
- r257099 Add missing plain.test.mk.
- r258297 Remove registration of C++ test programs into PROGS.
- r258298 Fix the build of plain test programs.
- r258551 Install plain.test.mk.
- r259208 Add tap.test.mk.
Approved by: rpaulo (mentor)
Diffstat (limited to 'share/mk/plain.test.mk')
-rw-r--r-- | share/mk/plain.test.mk | 52 |
1 files changed, 52 insertions, 0 deletions
diff --git a/share/mk/plain.test.mk b/share/mk/plain.test.mk new file mode 100644 index 0000000..b41c585 --- /dev/null +++ b/share/mk/plain.test.mk @@ -0,0 +1,52 @@ +# $FreeBSD$ +# +# Logic to build and install plain test programs. A plain test programs it not +# supposed to use any specific testing framework: all it does is run some code +# and report the test's pass or fail status via a 0 or 1 exit code. + +.include <bsd.init.mk> + +# List of C, C++ and shell test programs to build. +# +# Programs listed here are built according to the semantics of bsd.prog.mk for +# PROGS, PROGS_CXX and SCRIPTS, respectively. +# +# Test programs registered in this manner are set to be installed into TESTSDIR +# (which should be overriden by the Makefile) and are not required to provide a +# manpage. +PLAIN_TESTS_C?= +PLAIN_TESTS_CXX?= +PLAIN_TESTS_SH?= + +.if !empty(PLAIN_TESTS_C) +PROGS+= ${PLAIN_TESTS_C} +_TESTS+= ${PLAIN_TESTS_C} +.for _T in ${PLAIN_TESTS_C} +BINDIR.${_T}= ${TESTSDIR} +MAN.${_T}?= # empty +SRCS.${_T}?= ${_T}.c +TEST_INTERFACE.${_T}= plain +.endfor +.endif + +.if !empty(PLAIN_TESTS_CXX) +PROGS_CXX+= ${PLAIN_TESTS_CXX} +_TESTS+= ${PLAIN_TESTS_CXX} +.for _T in ${PLAIN_TESTS_CXX} +BINDIR.${_T}= ${TESTSDIR} +MAN.${_T}?= # empty +SRCS.${_T}?= ${_T}.cc +TEST_INTERFACE.${_T}= plain +.endfor +.endif + +.if !empty(PLAIN_TESTS_SH) +SCRIPTS+= ${PLAIN_TESTS_SH} +_TESTS+= ${PLAIN_TESTS_SH} +.for _T in ${PLAIN_TESTS_SH} +SCRIPTSDIR_${_T}= ${TESTSDIR} +TEST_INTERFACE.${_T}= plain +.endfor +.endif + +.include <bsd.test.mk> |