2014-11-04 00:19:10 +00:00
|
|
|
|
|
|
|
.if !target(__netbsd_tests.test.mk__)
|
|
|
|
__netbsd_tests.test.mk__:
|
|
|
|
|
2015-10-11 20:02:10 +00:00
|
|
|
TESTSRC?= ${SRCTOP}/contrib/netbsd-tests/${RELDIR:H}
|
2014-11-04 00:19:10 +00:00
|
|
|
|
2015-10-11 20:02:10 +00:00
|
|
|
.if !exists(${TESTSRC}/)
|
2022-02-04 23:59:00 +00:00
|
|
|
.error Please define TESTSRC to the absolute path of the test sources, e.g. $${SRCTOP}/contrib/netbsd-tests/lib/libc/stdio
|
2014-11-04 00:19:10 +00:00
|
|
|
.endif
|
|
|
|
|
|
|
|
.PATH: ${TESTSRC}
|
|
|
|
|
|
|
|
LIBNETBSD_SRCDIR= ${SRCTOP}/lib/libnetbsd
|
|
|
|
LIBNETBSD_OBJDIR= ${OBJTOP}/lib/libnetbsd
|
|
|
|
|
|
|
|
.for t in ${NETBSD_ATF_TESTS_C}
|
|
|
|
CFLAGS.$t+= -I${LIBNETBSD_SRCDIR} -I${SRCTOP}/contrib/netbsd-tests
|
|
|
|
LDFLAGS.$t+= -L${LIBNETBSD_OBJDIR}
|
|
|
|
|
2015-12-04 03:17:47 +00:00
|
|
|
LIBADD.${t}+= netbsd
|
2014-11-04 00:19:10 +00:00
|
|
|
|
|
|
|
SRCS.$t?= ${t:C/^/t_/:C/_test$//g}.c
|
|
|
|
.endfor
|
|
|
|
|
|
|
|
ATF_TESTS_C+= ${NETBSD_ATF_TESTS_C}
|
|
|
|
|
|
|
|
# A C++ analog isn't provided because there aren't any C++ testcases in
|
|
|
|
# contrib/netbsd-tests
|
|
|
|
|
|
|
|
.for t in ${NETBSD_ATF_TESTS_SH}
|
|
|
|
ATF_TESTS_SH_SRC_$t?= ${t:C/^/t_/:C/_test$//g}.sh
|
|
|
|
.endfor
|
|
|
|
|
|
|
|
ATF_TESTS_SH+= ${NETBSD_ATF_TESTS_SH}
|
|
|
|
|
|
|
|
.endif
|
|
|
|
|
|
|
|
# vim: syntax=make
|