diff options
Diffstat (limited to 'share/mk')
-rw-r--r-- | share/mk/bsd.README | 8 | ||||
-rw-r--r-- | share/mk/bsd.test.mk | 3 | ||||
-rw-r--r-- | share/mk/netbsd-tests.test.mk | 12 |
3 files changed, 14 insertions, 9 deletions
diff --git a/share/mk/bsd.README b/share/mk/bsd.README index d8a707f..179bcba 100644 --- a/share/mk/bsd.README +++ b/share/mk/bsd.README @@ -425,10 +425,16 @@ It has seven targets: It sets/uses the following variables, among many others: -TESTDIR Path to the installed tests. Must be a subdirectory of +TESTSBASE Installation prefix for tests. Defaults to /usr/tests + +TESTSDIR Path to the installed tests. Must be a subdirectory of TESTSBASE and the subpath should match the relative location of the tests within the src tree. + The value of TESTSDIR defaults to + ${TESTSBASE}/${RELDIR:H} , e.g. /usr/tests/bin/ls when + included from bin/ls/tests . + KYUAFILE If 'auto' (the default), generate a Kyuafile out of the test programs defined in the Makefile. If 'yes', then a manually-crafted Kyuafile must be supplied with the diff --git a/share/mk/bsd.test.mk b/share/mk/bsd.test.mk index af12418..6f20d3d 100644 --- a/share/mk/bsd.test.mk +++ b/share/mk/bsd.test.mk @@ -10,6 +10,9 @@ __<bsd.test.mk>__: +# Tests install directory +TESTSDIR?= ${TESTSBASE}/${RELDIR:H} + # List of subdirectories containing tests into which to recurse. This has the # same semantics as SUBDIR at build-time. However, the directories listed here # get registered into the run-time test suite definitions so that the test diff --git a/share/mk/netbsd-tests.test.mk b/share/mk/netbsd-tests.test.mk index 5c31d77..92a401b 100644 --- a/share/mk/netbsd-tests.test.mk +++ b/share/mk/netbsd-tests.test.mk @@ -3,16 +3,12 @@ .if !target(__netbsd_tests.test.mk__) __netbsd_tests.test.mk__: -.if !defined(OBJTOP) -.error "Please define OBJTOP to the absolute path of the top of the object tree" -.endif +OBJTOP?= ${.OBJDIR:S/${RELDIR}//} -.if !defined(SRCTOP) -.error "Please define SRCTOP to the absolute path of the top of the source tree" -.endif +TESTSRC?= ${SRCTOP}/contrib/netbsd-tests/${RELDIR:H} -.if !defined(TESTSRC) -.error "Please define TESTSRC to the absolute path of the test sources, e.g. contrib/netbsd-tests/lib/libc/stdio" +.if !exists(${TESTSRC}/) +.error "Please define TESTSRC to the absolute path of the test sources, e.g. $${SRCTOP}/contrib/netbsd-tests/lib/libc/stdio" .endif .PATH: ${TESTSRC} |