Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src Stop assuming that test programs and directories are the sam...



details:   https://anonhg.NetBSD.org/src/rev/03a1a49e6c08
branches:  trunk
changeset: 785112:03a1a49e6c08
user:      jmmv <jmmv%NetBSD.org@localhost>
date:      Sat Feb 23 21:20:14 2013 +0000

description:
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.

diffstat:

 share/mk/bsd.test.mk |  10 ++++++----
 tests/Makefile       |   6 +++---
 2 files changed, 9 insertions(+), 7 deletions(-)

diffs (64 lines):

diff -r 4d824000b555 -r 03a1a49e6c08 share/mk/bsd.test.mk
--- a/share/mk/bsd.test.mk      Sat Feb 23 21:04:28 2013 +0000
+++ b/share/mk/bsd.test.mk      Sat Feb 23 21:20:14 2013 +0000
@@ -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 @@
 
 .if defined(TESTS_SUBDIRS)
 SUBDIR+=       ${TESTS_SUBDIRS}
-_TESTS:=       ${TESTS_SUBDIRS:N.WAIT}
 .endif
 
 .include <bsd.subdir.mk>
@@ -57,10 +56,12 @@
 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 @@
        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
diff -r 4d824000b555 -r 03a1a49e6c08 tests/Makefile
--- a/tests/Makefile    Sat Feb 23 21:04:28 2013 +0000
+++ b/tests/Makefile    Sat Feb 23 21:20:14 2013 +0000
@@ -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 @@
 . 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>



Home | Main Index | Thread Index | Old Index