1# $FreeBSD$ 2 3TESTGROUP= ${.CURDIR:H:T}/${.CURDIR:T} 4TESTSRC= ${.CURDIR:H:H:H:H:H}/contrib/opensolaris/cmd/dtrace/test/tst/${TESTGROUP} 5TESTSDIR= ${TESTSBASE}/cddl/usr.sbin/dtrace/${TESTGROUP} 6 7FILESGROUPS+= FILES ${TESTGROUP} ${TESTGROUP}EXE 8 9${TESTGROUP}= ${TESTFILES} 10${TESTGROUP}EXE= ${TESTEXES} 11${TESTGROUP}EXEMODE= 0555 12 13TESTWRAPPER= t_dtrace_contrib 14ATF_TESTS_SH+= ${TESTWRAPPER} 15TEST_METADATA.t_dtrace_contrib+= required_files="/usr/local/bin/ksh" 16TEST_METADATA.t_dtrace_contrib+= required_user="root" 17 18GENTEST?= ${.CURDIR:H:H}/tools/gentest.sh 19EXCLUDE= ${.CURDIR:H:H}/tools/exclude.sh 20${TESTWRAPPER}.sh: ${GENTEST} ${EXCLUDE} ${${TESTGROUP}} 21 sh ${GENTEST} -e ${EXCLUDE} ${TESTGROUP} ${${TESTGROUP}:S/ */ /} > ${.TARGET} 22 23CLEANFILES+= ${TESTWRAPPER}.sh 24 25.PATH: ${TESTSRC} 26 27PROGS= ${CFILES:T:S/.c$/.exe/g} 28.for prog in ${PROGS} 29SRCS.${prog}+= ${prog:S/.exe$/.c/} 30 31.if exists(${prog:S/^tst.//:S/.exe$/.d/}) 32SRCS.${prog}+= ${prog:S/^tst.//:S/.exe$/.d/} 33.endif 34.endfor 35 36BINDIR= ${TESTSDIR} 37MAN= 38 39# Some tests depend on the internals of their corresponding test programs, 40# so make sure the optimizer doesn't interfere with them. 41CFLAGS+= -O0 42 43# Test programs shouldn't be stripped; else we generally can't use the PID 44# provider. 45DEBUG_FLAGS= -g 46STRIP= 47 48.include <bsd.test.mk> 49