Make bsd.test.mk the only public mk fragment for the building of tests.

Change {atf,plain,tap}.test.mk to be internal implementation details of
bsd.test.mk.  Makefiles that build tests should now only include bsd.test.mk
and declaratively specify what they want to build, without worrying about
the internal implementation of the mk files.

The reason for this change is to permit building test programs of different
interfaces from a single directory, which is something I had a need for
while porting tests over from src/tools/regression/.

Additionally, this change makes it possible to perform some other requested
changes to bsd.test.mk in an easier manner.  Coming soon.
This commit is contained in:
Julio Merino
2014-03-14 08:56:19 +00:00
parent cf961c95e5
commit f5fd950e35
20 changed files with 45 additions and 37 deletions
+5 -3
View File
@@ -1,12 +1,16 @@
# $FreeBSD$
#
# You must include bsd.test.mk instead of this file from your Makefile.
#
# Logic to build and install TAP-compliant test programs.
#
# This is provided to support existing tests in the FreeBSD source tree
# (particularly those coming from tools/regression/) that comply with the
# Test Anything Protocol. It should not be used for new tests.
.include <bsd.init.mk>
.if !target(__<bsd.test.mk>__)
.error tap.test.mk cannot be included directly.
.endif
# List of C, C++ and shell test programs to build.
#
@@ -87,5 +91,3 @@ ${_T}: ${TAP_TESTS_SH_SRC_${_T}}
mv ${.TARGET}.tmp ${.TARGET}
.endfor
.endif
.include <bsd.test.mk>