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