]> xenbits.xensource.com Git - people/julieng/freebsd.git/commitdiff
Default TESTSDIR to /usr/tests/${RELDIR:H}
authorngie <ngie@FreeBSD.org>
Sun, 11 Oct 2015 21:29:24 +0000 (21:29 +0000)
committerngie <ngie@FreeBSD.org>
Sun, 11 Oct 2015 21:29:24 +0000 (21:29 +0000)
When run from bin/ls/tests, for example, the value of TESTSDIR would be
${TESTSBASE}/${RELDIR:H} -> /usr/tests/bin/ls/tests/.. ->
/usr/tests/bin/ls

Document the new behavior in bsd.README.

While here, also document TESTSBASE

Relnotes: yes
Differential Revision: D1022
MFC after: 2 weeks
Sponsored by: EMC / Isilon Storage Division

share/mk/bsd.README
share/mk/bsd.test.mk

index 018374ffa4b8de977bd6aff24bf78083681e1d6c..cb6e41f3cf07c482d443053d3dadbb9a0816ff32 100644 (file)
@@ -474,10 +474,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
index c15f82e11c1d5dfee4861619d2ac6c6b4ac3efb7..86351cff3c6c4fae8c60b3cc8fbf2001f46a7715 100644 (file)
@@ -10,9 +10,8 @@
 
 __<bsd.test.mk>__:
 
-.ifndef TESTSDIR
-.error "Please define TESTSDIR when including bsd.test.mk"
-.endif
+# 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