xref: /freebsd/cddl/usr.sbin/dtrace/tests/dtrace.test.mk (revision d93a896ef95946b0bf1219866fcb324b78543444)
1# $FreeBSD$
2
3TESTGROUP= ${.CURDIR:H:T}/${.CURDIR:T}
4TESTSRC= ${SRCTOP}/cddl/contrib/opensolaris/cmd/dtrace/test/tst/${TESTGROUP}
5TESTSDIR= ${TESTSBASE}/cddl/usr.sbin/dtrace/${TESTGROUP}
6
7FILESGROUPS+=	${TESTGROUP}EXE
8
9${TESTGROUP}EXE= ${TESTEXES}
10${TESTGROUP}EXEMODE= 0555
11${TESTGROUP}EXEPACKAGE=	${PACKAGE}
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} ${${PACKAGE}FILES}
21	sh ${GENTEST} -e ${EXCLUDE} ${TESTGROUP} ${${PACKAGE}FILES: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