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
__<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