Module Name:    src
Committed By:   jmmv
Date:           Sat Feb 23 21:20:14 UTC 2013

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

Log Message:
Stop assuming that test programs and directories are the same thing during
Atffile generation.

This is needed to be able to generate Kyuafiles (coming later), as these
clearly differentiate between the definition of test programs and the
recursion into other subdirectories (or files).

In particular: rename ATFFILE_EXTRA_TPS to ATFFILE_EXTRA_SUBDIRS and
change the logic in bsd.test.mk to keep track of subdirectories aside from
_TESTS when creating the Atffile.


To generate a diff of this commit:
cvs rdiff -u -r1.22 -r1.23 src/share/mk/bsd.test.mk
cvs rdiff -u -r1.42 -r1.43 src/tests/Makefile

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.22 src/share/mk/bsd.test.mk:1.23
--- src/share/mk/bsd.test.mk:1.22	Sat Feb 16 15:00:44 2013
+++ src/share/mk/bsd.test.mk	Sat Feb 23 21:20:14 2013
@@ -1,4 +1,4 @@
-# $NetBSD: bsd.test.mk,v 1.22 2013/02/16 15:00:44 jmmv Exp $
+# $NetBSD: bsd.test.mk,v 1.23 2013/02/23 21:20:14 jmmv Exp $
 #
 
 .include <bsd.init.mk>
@@ -7,7 +7,6 @@ _TESTS:=	# empty
 
 .if defined(TESTS_SUBDIRS)
 SUBDIR+=	${TESTS_SUBDIRS}
-_TESTS:=	${TESTS_SUBDIRS:N.WAIT}
 .endif
 
 .include <bsd.subdir.mk>
@@ -57,10 +56,12 @@ ${_T}: ${TESTS_SH_SRC_${_T}}
 ATFFILE?=	auto
 
 # Additional list of 'tp' entries to add to the Atffile when ATFFILE=auto.
+# These entries must all correspond to subdirectories to descend into.
+#
 # 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?=
+ATFFILE_EXTRA_SUBDIRS?=
 
 .if ${ATFFILE:tl} != "no"
 FILES+=			Atffile
@@ -78,7 +79,8 @@ Atffile: Makefile
 	echo; \
 	echo 'prop: test-suite = "NetBSD"'; \
 	echo; \
-	for tp in ${_TESTS} ${ATFFILE_EXTRA_TPS}; do \
+	for tp in ${TESTS_SUBDIRS:N.WAIT} ${_TESTS} ${ATFFILE_EXTRA_SUBDIRS}; \
+	do \
 	    echo "tp: $${tp}"; \
 	done; } >Atffile.tmp
 	@mv Atffile.tmp Atffile

Index: src/tests/Makefile
diff -u src/tests/Makefile:1.42 src/tests/Makefile:1.43
--- src/tests/Makefile:1.42	Sat Feb 23 14:22:24 2013
+++ src/tests/Makefile	Sat Feb 23 21:20:14 2013
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.42 2013/02/23 14:22:24 jmmv Exp $
+# $NetBSD: Makefile,v 1.43 2013/02/23 21:20:14 jmmv Exp $
 
 .include <bsd.own.mk>
 
@@ -30,11 +30,11 @@ TESTS_SUBDIRS+=		share
 . endif
 
 . if ${MKATF} != "no"
-ATFFILE_EXTRA_TPS+=	atf
+ATFFILE_EXTRA_SUBDIRS+=	atf
 . endif
 
 . if ${MKKYUA} != "no"
-ATFFILE_EXTRA_TPS+=	kyua-cli kyua-testers
+ATFFILE_EXTRA_SUBDIRS+=	kyua-cli kyua-testers
 . endif
 
 .include <bsd.test.mk>

Reply via email to