1 # $NetBSD: bsd.test.mk,v 1.21 2012/08/25 22:21:16 jmmv Exp $
9 BINDIR.${_T}= ${TESTSDIR}
14 .if defined(TESTS_CXX)
15 PROGS_CXX+= ${TESTS_CXX}
17 .for _T in ${TESTS_CXX}
18 BINDIR.${_T}= ${TESTSDIR}
25 .for _T in ${TESTS_SH}
26 SCRIPTSDIR_${_T}= ${TESTSDIR}
30 TESTSBASE?= ${DESTDIR}/usr/tests
32 # it is rare for test cases to have man pages
38 # tell progs.mk we might want to install things
40 PROGS_TARGETS+= install
42 .if !empty(PROGS) || !empty(PROGS_CXX) || !empty(SCRIPTS)
43 .include <bsd.progs.mk>
48 .if ${TESTSDIR} == ${TESTSBASE}
49 # Forbid running from ${TESTSBASE}. It can cause false positives/negatives and
50 # it does not cover all the tests (e.g. it misses testing software in external).
51 @echo "*** Sorry, you cannot use make test from src/tests. Install the"
52 @echo "*** tests into their final location and run them from ${TESTSBASE}"
55 @echo "*** Using this test does not preclude you from running the tests"
56 @echo "*** installed in ${TESTSBASE}. This test run may raise false"
57 @echo "*** positives and/or false negatives."
60 @echo "*** No TESTSDIR defined; nothing to do."
67 @echo "$@ not defined; skipping"
71 .ORDER: beforetest realtest
72 test: beforetest realtest
75 .ORDER: realtest aftertest