diff options
author | jmmv <jmmv@FreeBSD.org> | 2014-06-10 17:04:30 +0000 |
---|---|---|
committer | jmmv <jmmv@FreeBSD.org> | 2014-06-10 17:04:30 +0000 |
commit | eaa2cac55821c825b2408c2685152668dd8e436a (patch) | |
tree | 14219a1465e8bb9a0c64910c555829e62c34c481 /share | |
parent | e48c89801a60e658b6613418e437afee6c72cd98 (diff) | |
download | FreeBSD-src-eaa2cac55821c825b2408c2685152668dd8e436a.zip FreeBSD-src-eaa2cac55821c825b2408c2685152668dd8e436a.tar.gz |
Put the test suite in its own tests.txz distribution file.
Force all the contents of /usr/tests to go into a separate distribution
file so that users of binary releases can easily choose to not install it.
To make this possible, we need two fixes:
- bsd.subdir.mk needs to properly honor NO_SUBDIR in all cases so that we
do not recurse into 'tests' subdirectories when we needn't. Otherwise,
we end up with some Kyuafiles in base.txz.
- etc/Makefile needs to skip installing tests in its 'distribute' target
so that a Kyuafile doesn't leak into base.txz.
Approved by: gjb
Diffstat (limited to 'share')
-rw-r--r-- | share/mk/bsd.subdir.mk | 2 | ||||
-rw-r--r-- | share/mk/bsd.test.mk | 9 |
2 files changed, 11 insertions, 0 deletions
diff --git a/share/mk/bsd.subdir.mk b/share/mk/bsd.subdir.mk index b93a5d7..b0ce120 100644 --- a/share/mk/bsd.subdir.mk +++ b/share/mk/bsd.subdir.mk @@ -81,6 +81,7 @@ __subdir_targets+= .WAIT .else __subdir_targets+= ${__target}_subdir_${__dir} ${__target}_subdir_${__dir}: .MAKE +.if !defined(NO_SUBDIR) @${_+_}set -e; \ if test -d ${.CURDIR}/${__dir}.${MACHINE_ARCH}; then \ ${ECHODIR} "===> ${DIRPRFX}${__dir}.${MACHINE_ARCH} (${__target:realinstall=install})"; \ @@ -94,6 +95,7 @@ ${__target}_subdir_${__dir}: .MAKE ${MAKE} ${__target:realinstall=install} \ DIRPRFX=${DIRPRFX}$$edir/ .endif +.endif .endfor ${__target}: ${__subdir_targets} .else diff --git a/share/mk/bsd.test.mk b/share/mk/bsd.test.mk index 4060677..3453d94 100644 --- a/share/mk/bsd.test.mk +++ b/share/mk/bsd.test.mk @@ -27,6 +27,15 @@ TESTS_SUBDIRS?= # List of variables to pass to the tests at run-time via the environment. TESTS_ENV?= +# Force all tests in a separate distribution file. +# +# We want this to be the case even when the distribution name is already +# overriden. For example: we want the tests for programs in the 'games' +# distribution to end up in the 'tests' distribution; the test programs +# themselves have all the necessary logic to detect that the games are not +# installed and thus won't cause false negatives. +DISTRIBUTION:= tests + # Ordered list of directories to construct the PATH for the tests. TESTS_PATH+= ${DESTDIR}/bin ${DESTDIR}/sbin \ ${DESTDIR}/usr/bin ${DESTDIR}/usr/sbin |