Module Name:    src
Committed By:   jmmv
Date:           Sat Feb 16 15:00:44 UTC 2013

Modified Files:
        src/share/mk: bsd.test.mk

Log Message:
Add ATFFILE_EXTRA_TPS.

The new ATFFILE_EXTRA_TPS variable can hold a set of test programs or
subdirectories to be added to the generated Atffile, without needing these
to be built by the current Makefile.

This is to be used in conjunction with MK* knobs and external/ so that
a 3rd-party component can place its tests in the corresponding tests/
directory and have the parent Atffile recognize them.

An alternative would be to use 'tp-glob' in the Atffile and list the names
of the directories/tests that may or may not exist.  However, this would
require providing manually-crafted Atffiles -- and because the majority are
auto-generated, there would be some confusion.


To generate a diff of this commit:
cvs rdiff -u -r1.21 -r1.22 src/share/mk/bsd.test.mk

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/share/mk/bsd.test.mk
diff -u src/share/mk/bsd.test.mk:1.21 src/share/mk/bsd.test.mk:1.22
--- src/share/mk/bsd.test.mk:1.21	Sat Aug 25 22:21:16 2012
+++ src/share/mk/bsd.test.mk	Sat Feb 16 15:00:44 2013
@@ -1,4 +1,4 @@
-# $NetBSD: bsd.test.mk,v 1.21 2012/08/25 22:21:16 jmmv Exp $
+# $NetBSD: bsd.test.mk,v 1.22 2013/02/16 15:00:44 jmmv Exp $
 #
 
 .include <bsd.init.mk>
@@ -56,6 +56,12 @@ ${_T}: ${TESTS_SH_SRC_${_T}}
 
 ATFFILE?=	auto
 
+# Additional list of 'tp' entries to add to the Atffile when ATFFILE=auto.
+# This is useful in the cases where the tests in a single directory come
+# from various sources (e.g. src/tests and src/external/.../tests) and
+# the installation of some of those tests rely on MK* variables being set.
+ATFFILE_EXTRA_TPS?=
+
 .if ${ATFFILE:tl} != "no"
 FILES+=			Atffile
 FILESDIR_Atffile=	${TESTSDIR}
@@ -72,7 +78,7 @@ Atffile: Makefile
 	echo; \
 	echo 'prop: test-suite = "NetBSD"'; \
 	echo; \
-	for tp in ${_TESTS}; do \
+	for tp in ${_TESTS} ${ATFFILE_EXTRA_TPS}; do \
 	    echo "tp: $${tp}"; \
 	done; } >Atffile.tmp
 	@mv Atffile.tmp Atffile

Reply via email to