1# $FreeBSD$ 2# 3# Logic to build and install plain test programs. A plain test programs it not 4# supposed to use any specific testing framework: all it does is run some code 5# and report the test's pass or fail status via a 0 or 1 exit code. 6 7.include <bsd.init.mk> 8 9# List of C, C++ and shell test programs to build. 10# 11# Programs listed here are built according to the semantics of bsd.prog.mk for 12# PROGS, PROGS_CXX and SCRIPTS, respectively. 13# 14# Test programs registered in this manner are set to be installed into TESTSDIR 15# (which should be overriden by the Makefile) and are not required to provide a 16# manpage. 17PLAIN_TESTS_C?= 18PLAIN_TESTS_CXX?= 19PLAIN_TESTS_SH?= 20 21.if !empty(PLAIN_TESTS_C) 22PROGS+= ${PLAIN_TESTS_C} 23_TESTS+= ${PLAIN_TESTS_C} 24.for _T in ${PLAIN_TESTS_C} 25BINDIR.${_T}= ${TESTSDIR} 26MAN.${_T}?= # empty 27TEST_INTERFACE.${_T}= plain 28.endfor 29.endif 30 31.if !empty(PLAIN_TESTS_CXX) 32PROGS_CXX+= ${PLAIN_TESTS_CXX} 33PROGS+= ${PLAIN_TESTS_CXX} 34_TESTS+= ${PLAIN_TESTS_CXX} 35.for _T in ${PLAIN_TESTS_CXX} 36BINDIR.${_T}= ${TESTSDIR} 37MAN.${_T}?= # empty 38TEST_INTERFACE.${_T}= plain 39.endfor 40.endif 41 42.if !empty(PLAIN_TESTS_SH) 43SCRIPTS+= ${PLAIN_TESTS_SH} 44_TESTS+= ${PLAIN_TESTS_SH} 45.for _T in ${PLAIN_TESTS_SH} 46SCRIPTSDIR_${_T}= ${TESTSDIR} 47TEST_INTERFACE.${_T}= plain 48.endfor 49.endif 50 51.include <bsd.test.mk> 52