Source-Changes-HG archive

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

[src/trunk]: src/share/mk Add ATFFILE_EXTRA_TPS.



details:   https://anonhg.NetBSD.org/src/rev/43fa2f1689f1
branches:  trunk
changeset: 784982:43fa2f1689f1
user:      jmmv <jmmv%NetBSD.org@localhost>
date:      Sat Feb 16 15:00:44 2013 +0000

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

diffstat:

 share/mk/bsd.test.mk |  10 ++++++++--
 1 files changed, 8 insertions(+), 2 deletions(-)

diffs (31 lines):

diff -r df421f2eac07 -r 43fa2f1689f1 share/mk/bsd.test.mk
--- a/share/mk/bsd.test.mk      Sat Feb 16 13:45:45 2013 +0000
+++ b/share/mk/bsd.test.mk      Sat Feb 16 15:00:44 2013 +0000
@@ -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 @@
 
 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 @@
        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



Home | Main Index | Thread Index | Old Index