1# $FreeBSD$ 2 3.if !target(__netbsd_tests.test.mk__) 4__netbsd_tests.test.mk__: 5 6TESTSRC?= ${SRCTOP}/contrib/netbsd-tests/${RELDIR:H} 7 8.if !exists(${TESTSRC}/) 9.error Please define TESTSRC to the absolute path of the test sources, e.g. $${SRCTOP}/contrib/netbsd-tests/lib/libc/stdio 10.endif 11 12.PATH: ${TESTSRC} 13 14LIBNETBSD_SRCDIR= ${SRCTOP}/lib/libnetbsd 15LIBNETBSD_OBJDIR= ${OBJTOP}/lib/libnetbsd 16 17.for t in ${NETBSD_ATF_TESTS_C} 18CFLAGS.$t+= -I${LIBNETBSD_SRCDIR} -I${SRCTOP}/contrib/netbsd-tests 19LDFLAGS.$t+= -L${LIBNETBSD_OBJDIR} 20 21LIBADD.${t}+= netbsd 22 23SRCS.$t?= ${t:C/^/t_/:C/_test$//g}.c 24.endfor 25 26ATF_TESTS_C+= ${NETBSD_ATF_TESTS_C} 27 28# A C++ analog isn't provided because there aren't any C++ testcases in 29# contrib/netbsd-tests 30 31.for t in ${NETBSD_ATF_TESTS_SH} 32ATF_TESTS_SH_SRC_$t?= ${t:C/^/t_/:C/_test$//g}.sh 33.endfor 34 35ATF_TESTS_SH+= ${NETBSD_ATF_TESTS_SH} 36 37.endif 38 39# vim: syntax=make 40