aboutsummaryrefslogtreecommitdiff
path: root/share/mk/suite.test.mk
diff options
context:
space:
mode:
Diffstat (limited to 'share/mk/suite.test.mk')
-rw-r--r--share/mk/suite.test.mk38
1 files changed, 12 insertions, 26 deletions
diff --git a/share/mk/suite.test.mk b/share/mk/suite.test.mk
index c447a171bf52..2b87d7fba602 100644
--- a/share/mk/suite.test.mk
+++ b/share/mk/suite.test.mk
@@ -8,10 +8,6 @@
.error suite.test.mk cannot be included directly.
.endif
-# Directory in which to install tests defined by the current Makefile.
-# Makefiles have to override this to point to a subdirectory of TESTSBASE.
-TESTSDIR?= .
-
# Name of the test suite these tests belong to. Should rarely be changed for
# Makefiles built into the FreeBSD src tree.
TESTSUITE?= FreeBSD
@@ -49,31 +45,21 @@ KYUAFILE?= auto
# unqualified TEST_METADATA variable.
#TEST_METADATA.<test-program>+= key="value"
-# Path to the prefix of the installed Kyua CLI, if any.
-#
-# If kyua is installed from ports, we automatically define a realtest target
-# below to run the tests using this tool. The tools are searched for in the
-# hierarchy specified by this variable.
-KYUA_PREFIX?= /usr/local
-
-.if ${KYUAFILE:tl} == "yes"
+.if ${KYUAFILE:tl} != "no"
FILES+= Kyuafile
FILESDIR_Kyuafile= ${TESTSDIR}
+.endif
-CLEANFILES+= Kyuafile.auto Kyuafile.auto.tmp
-.elif ${KYUAFILE:tl} == "auto"
-FILES+= Kyuafile.auto
-FILESDIR_Kyuafile.auto= ${TESTSDIR}
-FILESNAME_Kyuafile.auto= Kyuafile
-
-CLEANFILES+= Kyuafile.auto Kyuafile.auto.tmp
+.if ${KYUAFILE:tl} == "auto"
+CLEANFILES+= Kyuafile Kyuafile.tmp
+.endif
.for _T in ${_TESTS}
_TEST_METADATA.${_T}= ${TEST_METADATA} ${TEST_METADATA.${_T}}
.endfor
-.NOPATH: Kyuafile.auto
-Kyuafile.auto: Makefile
+.if ${KYUAFILE:tl} == "auto"
+Kyuafile: Makefile
@{ \
echo '-- Automatically generated by bsd.test.mk.'; \
echo; \
@@ -81,18 +67,18 @@ Kyuafile.auto: Makefile
echo; \
echo 'test_suite("${TESTSUITE}")'; \
echo; \
- } >Kyuafile.auto.tmp
+ } > ${.TARGET}.tmp
.for _T in ${_TESTS}
@echo '${TEST_INTERFACE.${_T}}_test_program{name="${_T}"${_TEST_METADATA.${_T}:C/$/,/:tW:C/^/, /W:C/,$//W}}' \
- >>Kyuafile.auto.tmp
+ >>${.TARGET}.tmp
.endfor
.for _T in ${TESTS_SUBDIRS:N.WAIT}
- @echo "include(\"${_T}/Kyuafile\")" >>Kyuafile.auto.tmp
+ @echo "include(\"${_T}/${.TARGET}\")" >>${.TARGET}.tmp
.endfor
- @mv Kyuafile.auto.tmp Kyuafile.auto
+ @mv ${.TARGET}.tmp ${.TARGET}
.endif
-KYUA?= ${KYUA_PREFIX}/bin/kyua
+KYUA= ${LOCALBASE}/bin/kyua
.if exists(${KYUA})
# Definition of the "make test" target and supporting variables.
#