summaryrefslogtreecommitdiffstats
path: root/share
diff options
context:
space:
mode:
authorngie <ngie@FreeBSD.org>2015-10-11 21:29:24 +0000
committerngie <ngie@FreeBSD.org>2015-10-11 21:29:24 +0000
commit4b946e6d78df59fc08a27d0a0830f287a59ff27f (patch)
treec6b2e9df081a824c96598047fd9aac1026ab9700 /share
parent557f35d9bf234011e1958c9768bdd538daccf578 (diff)
downloadFreeBSD-src-4b946e6d78df59fc08a27d0a0830f287a59ff27f.zip
FreeBSD-src-4b946e6d78df59fc08a27d0a0830f287a59ff27f.tar.gz
Default TESTSDIR to /usr/tests/${RELDIR:H}
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
Diffstat (limited to 'share')
-rw-r--r--share/mk/bsd.README8
-rw-r--r--share/mk/bsd.test.mk5
2 files changed, 9 insertions, 4 deletions
diff --git a/share/mk/bsd.README b/share/mk/bsd.README
index 018374f..cb6e41f 100644
--- a/share/mk/bsd.README
+++ b/share/mk/bsd.README
@@ -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
diff --git a/share/mk/bsd.test.mk b/share/mk/bsd.test.mk
index c15f82e..86351cf 100644
--- a/share/mk/bsd.test.mk
+++ b/share/mk/bsd.test.mk
@@ -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
OpenPOWER on IntegriCloud