From owner-svn-src-head@FreeBSD.ORG Tue Jun 10 17:04:32 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 3873B333; Tue, 10 Jun 2014 17:04:32 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1243C2BA5; Tue, 10 Jun 2014 17:04:32 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s5AH4VgV007395; Tue, 10 Jun 2014 17:04:31 GMT (envelope-from jmmv@svn.freebsd.org) Received: (from jmmv@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s5AH4Vjm007388; Tue, 10 Jun 2014 17:04:31 GMT (envelope-from jmmv@svn.freebsd.org) Message-Id: <201406101704.s5AH4Vjm007388@svn.freebsd.org> From: Julio Merino Date: Tue, 10 Jun 2014 17:04:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r267331 - in head: . etc share/mk X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 10 Jun 2014 17:04:32 -0000 Author: jmmv Date: Tue Jun 10 17:04:30 2014 New Revision: 267331 URL: http://svnweb.freebsd.org/changeset/base/267331 Log: 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 Modified: head/Makefile.inc1 head/etc/Makefile head/share/mk/bsd.subdir.mk head/share/mk/bsd.test.mk Modified: head/Makefile.inc1 ============================================================================== --- head/Makefile.inc1 Tue Jun 10 16:45:58 2014 (r267330) +++ head/Makefile.inc1 Tue Jun 10 17:04:30 2014 (r267331) @@ -776,6 +776,9 @@ EXTRA_DISTRIBUTIONS+= games .if defined(LIB32TMP) && ${MK_LIB32} != "no" EXTRA_DISTRIBUTIONS+= lib32 .endif +.if ${MK_TESTS} != "no" +EXTRA_DISTRIBUTIONS+= tests +.endif MTREE_MAGIC?= mtree 2.0 @@ -817,6 +820,10 @@ distributeworld installworld: _installch mtree -deU -f ${.CURDIR}/etc/mtree/BSD.debug.dist \ -p ${DESTDIR}/${DISTDIR}/${dist}/usr/lib >/dev/null .endif +.if ${MK_TESTS} != "no" && ${dist} == "tests" + mtree -deU -f ${.CURDIR}/etc/mtree/BSD.tests.dist \ + -p ${DESTDIR}/${DISTDIR}/${dist}/usr >/dev/null +.endif .if defined(NO_ROOT) ${IMAKEENV} mtree -C -f ${.CURDIR}/etc/mtree/BSD.root.dist | \ sed -e 's#^\./#./${dist}/#' >> ${METALOG} Modified: head/etc/Makefile ============================================================================== --- head/etc/Makefile Tue Jun 10 16:45:58 2014 (r267330) +++ head/etc/Makefile Tue Jun 10 17:04:30 2014 (r267331) @@ -174,7 +174,10 @@ afterinstall: .endif distribute: - ${_+_}cd ${.CURDIR} ; ${MAKE} install DESTDIR=${DISTDIR}/${DISTRIBUTION} + # Avoid installing tests here; "make distribution" will do this and + # correctly place them in the right location. + ${_+_}cd ${.CURDIR} ; ${MAKE} MK_TESTS=no install \ + DESTDIR=${DISTDIR}/${DISTRIBUTION} ${_+_}cd ${.CURDIR} ; ${MAKE} distribution DESTDIR=${DISTDIR}/${DISTRIBUTION} .include Modified: head/share/mk/bsd.subdir.mk ============================================================================== --- head/share/mk/bsd.subdir.mk Tue Jun 10 16:45:58 2014 (r267330) +++ head/share/mk/bsd.subdir.mk Tue Jun 10 17:04:30 2014 (r267331) @@ -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 Modified: head/share/mk/bsd.test.mk ============================================================================== --- head/share/mk/bsd.test.mk Tue Jun 10 16:45:58 2014 (r267330) +++ head/share/mk/bsd.test.mk Tue Jun 10 17:04:30 2014 (r267331) @@ -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