Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 28 Dec 2013 20:05:31 +0000 (UTC)
From:      Julio Merino <jmmv@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org
Subject:   svn commit: r260013 - in stable/10: . etc etc/mtree lib lib/libcrypt lib/libcrypt/tests lib/tests libexec share/doc share/man/man1 share/man/man4 share/man/man7 share/mk tests tools/build/mk tools/...
Message-ID:  <201312282005.rBSK5Vx6033981@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: jmmv
Date: Sat Dec 28 20:05:31 2013
New Revision: 260013
URL: http://svnweb.freebsd.org/changeset/base/260013

Log:
  Set up the /usr/tests hierarchy.
  
  This is a MFC of the following into stable/10:
  - r257097 Set up the /usr/tests hierarchy.
  - r257098 Add missing WITHOUTTESTS file.
  - r257100 Add a tests(7) manual page.
  - r257105 Disable WITHTESTS= for now.
  - r257848 Fix buildworld when WITHTESTS is enabled.
  - r257850 Subsume the functionality of MKATF into MKTESTS.
  - r257851 Handle the removal of the test suite when WITHOUTTESTS=yes.
  - r257852 Install category Kyuafiles from their category directories.
  - r258232 Install BSD.tests.mtree when MKTESTS is yes.
  
  Note that building with WITH_TESTS is still broken at this point (and
  hence why WITHOUT_TESTS is the set as the default).  Subsequent pullups
  will fix the remaining issues.

Added:
  stable/10/etc/mtree/BSD.tests.dist
     - copied unchanged from r257097, head/etc/mtree/BSD.tests.dist
  stable/10/lib/tests/
     - copied from r257852, head/lib/tests/
  stable/10/share/man/man7/tests.7
     - copied unchanged from r257100, head/share/man/man7/tests.7
  stable/10/tests/
     - copied from r257097, head/tests/
  stable/10/tools/build/options/WITHOUT_TESTS
     - copied unchanged from r257098, head/tools/build/options/WITHOUT_TESTS
Modified:
  stable/10/Makefile.inc1
  stable/10/UPDATING
  stable/10/etc/Makefile
  stable/10/etc/mtree/Makefile
  stable/10/lib/Makefile
  stable/10/lib/libcrypt/Makefile
  stable/10/lib/libcrypt/tests/Makefile
  stable/10/libexec/Makefile
  stable/10/share/doc/Makefile
  stable/10/share/man/man1/Makefile
  stable/10/share/man/man4/Makefile
  stable/10/share/man/man7/Makefile
  stable/10/share/man/man7/hier.7
  stable/10/share/mk/Makefile
  stable/10/share/mk/bsd.own.mk
  stable/10/tests/Makefile
  stable/10/tests/README
  stable/10/tools/build/mk/OptionalObsoleteFiles.inc
  stable/10/usr.bin/Makefile
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/Makefile.inc1
==============================================================================
--- stable/10/Makefile.inc1	Sat Dec 28 20:03:14 2013	(r260012)
+++ stable/10/Makefile.inc1	Sat Dec 28 20:05:31 2013	(r260013)
@@ -85,6 +85,9 @@ SUBDIR+=secure
 SUBDIR+=share
 .endif
 SUBDIR+=sys usr.bin usr.sbin
+.if ${MK_TESTS} != "no"
+SUBDIR+=	tests
+.endif
 .if ${MK_OFED} != "no"
 SUBDIR+=contrib/ofed
 .endif
@@ -489,6 +492,10 @@ _worldtmp:
 	mtree -deU -f ${.CURDIR}/etc/mtree/BSD.debug.dist \
 	    -p ${WORLDTMP}/usr/lib >/dev/null
 .endif
+.if ${MK_TESTS} != "no"
+	mtree -deU -f ${.CURDIR}/etc/mtree/BSD.tests.dist \
+	    -p ${WORLDTMP}${TESTSBASE} >/dev/null
+.endif
 .for _mtree in ${LOCAL_MTREE}
 	mtree -deU -f ${.CURDIR}/${_mtree} -p ${WORLDTMP} > /dev/null
 .endfor
@@ -1487,7 +1494,7 @@ _prebuild_libs=	${_kerberos5_lib_libasn1
 		${_secure_lib_libcrypto} ${_lib_libldns} \
 		${_secure_lib_libssh} ${_secure_lib_libssl}
 
-.if ${MK_ATF} != "no"
+.if ${MK_TESTS} != "no"
 _lib_atf_libatf_c=	lib/atf/libatf-c
 .endif
 
@@ -1597,10 +1604,12 @@ ${_lib}__PL: .PHONY .MAKE
 .if exists(${.CURDIR}/${_lib})
 	${_+_}@${ECHODIR} "===> ${_lib} (obj,depend,all,install)"; \
 		cd ${.CURDIR}/${_lib} && \
-		${MAKE} DIRPRFX=${_lib}/ obj && \
-		${MAKE} DIRPRFX=${_lib}/ depend && \
-		${MAKE} -DNO_PROFILE -DNO_PIC DIRPRFX=${_lib}/ all && \
-		${MAKE} -DNO_PROFILE -DNO_PIC DIRPRFX=${_lib}/ install
+		${MAKE} -DNO_TESTS DIRPRFX=${_lib}/ obj && \
+		${MAKE} -DNO_TESTS DIRPRFX=${_lib}/ depend && \
+		${MAKE} -DNO_TESTS -DNO_PROFILE -DNO_PIC \
+		    DIRPRFX=${_lib}/ all && \
+		${MAKE} -DNO_TESTS -DNO_PROFILE -DNO_PIC \
+		    DIRPRFX=${_lib}/ install
 .endif
 .endfor
 
@@ -1609,10 +1618,10 @@ ${_lib}__L: .PHONY .MAKE
 .if exists(${.CURDIR}/${_lib})
 	${_+_}@${ECHODIR} "===> ${_lib} (obj,depend,all,install)"; \
 		cd ${.CURDIR}/${_lib} && \
-		${MAKE} DIRPRFX=${_lib}/ obj && \
-		${MAKE} DIRPRFX=${_lib}/ depend && \
-		${MAKE} DIRPRFX=${_lib}/ all && \
-		${MAKE} DIRPRFX=${_lib}/ install
+		${MAKE} -DNO_TESTS DIRPRFX=${_lib}/ obj && \
+		${MAKE} -DNO_TESTS DIRPRFX=${_lib}/ depend && \
+		${MAKE} -DNO_TESTS DIRPRFX=${_lib}/ all && \
+		${MAKE} -DNO_TESTS DIRPRFX=${_lib}/ install
 .endif
 .endfor
 
@@ -1622,10 +1631,12 @@ ${_lib}__L: .PHONY .MAKE
 lib/libpam__L: .PHONY .MAKE
 	${_+_}@${ECHODIR} "===> lib/libpam (obj,depend,all,install)"; \
 		cd ${.CURDIR}/lib/libpam && \
-		${MAKE} DIRPRFX=lib/libpam/ obj && \
-		${MAKE} DIRPRFX=lib/libpam/ depend && \
-		${MAKE} DIRPRFX=lib/libpam/ -D_NO_LIBPAM_SO_YET all && \
-		${MAKE} DIRPRFX=lib/libpam/ -D_NO_LIBPAM_SO_YET install
+		${MAKE} -DNO_TESTS DIRPRFX=lib/libpam/ obj && \
+		${MAKE} -DNO_TESTS DIRPRFX=lib/libpam/ depend && \
+		${MAKE} -DNO_TESTS DIRPRFX=lib/libpam/ \
+		    -D_NO_LIBPAM_SO_YET all && \
+		${MAKE} -DNO_TESTS DIRPRFX=lib/libpam/ \
+		    -D_NO_LIBPAM_SO_YET install
 
 _prereq_libs: ${_prereq_libs:S/$/__PL/}
 _startup_libs: ${_startup_libs:S/$/__L/}

Modified: stable/10/UPDATING
==============================================================================
--- stable/10/UPDATING	Sat Dec 28 20:03:14 2013	(r260012)
+++ stable/10/UPDATING	Sat Dec 28 20:05:31 2013	(r260013)
@@ -27,6 +27,12 @@ older version of current is a bit fragil
 	big-endian integer in accordance with RFC 4402.
 	__FreeBSD_version is bumped to 1000701.
 
+20131108:
+	The WITHOUT_ATF build knob has been removed and its functionality
+	has been subsumed into the more generic WITHOUT_TESTS.  If you were
+	using the former to disable the build of the ATF libraries, you
+	should change your settings to use the latter.
+
 20131031:
 	The default version of mtree is nmtree which is obtained from
 	NetBSD.  The output is generally the same, but may vary

Modified: stable/10/etc/Makefile
==============================================================================
--- stable/10/etc/Makefile	Sat Dec 28 20:03:14 2013	(r260012)
+++ stable/10/etc/Makefile	Sat Dec 28 20:05:31 2013	(r260013)
@@ -139,6 +139,9 @@ BIN1+= regdomain.xml
 BIN2=	netstart pccard_ether rc.suspend rc.resume
 
 MTREE=	BSD.include.dist BSD.root.dist BSD.usr.dist BSD.var.dist
+.if ${MK_TESTS} != "no"
+MTREE+=	BSD.tests.dist
+.endif
 .if ${MK_SENDMAIL} != "no"
 MTREE+=	BSD.sendmail.dist
 .endif
@@ -317,6 +320,9 @@ MTREES+=	mtree/BSD.debug.dist		/usr/lib
 .if ${MK_GROFF} != "no"
 MTREES+=	mtree/BSD.groff.dist		/usr
 .endif
+.if ${MK_TESTS} != "no"
+MTREES+=	mtree/BSD.tests.dist		${TESTSBASE}
+.endif
 .if ${MK_SENDMAIL} != "no"
 MTREES+=	mtree/BSD.sendmail.dist		/
 .endif

Copied: stable/10/etc/mtree/BSD.tests.dist (from r257097, head/etc/mtree/BSD.tests.dist)
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ stable/10/etc/mtree/BSD.tests.dist	Sat Dec 28 20:05:31 2013	(r260013, copy of r257097, head/etc/mtree/BSD.tests.dist)
@@ -0,0 +1,12 @@
+# $FreeBSD$
+#
+# Please see the file src/etc/mtree/README before making changes to this file.
+#
+
+/set type=dir uname=root gname=wheel mode=0755
+.
+    lib
+        libcrypt
+        ..
+    ..
+..

Modified: stable/10/etc/mtree/Makefile
==============================================================================
--- stable/10/etc/mtree/Makefile	Sat Dec 28 20:03:14 2013	(r260012)
+++ stable/10/etc/mtree/Makefile	Sat Dec 28 20:05:31 2013	(r260013)
@@ -6,6 +6,7 @@ FILES=	${_BSD.debug.dist} \
 	BSD.include.dist \
 	BSD.root.dist \
 	${_BSD.sendmail.dist} \
+	${_BSD.tests.dist} \
 	BSD.usr.dist \
 	BSD.var.dist
 
@@ -18,6 +19,9 @@ _BSD.groff.dist=	BSD.groff.dist
 .if ${MK_SENDMAIL} != "no"
 _BSD.sendmail.dist=	BSD.sendmail.dist
 .endif
+.if ${MK_TESTS} != "no"
+_BSD.tests.dist=	BSD.tests.dist
+.endif
 
 NO_OBJ=
 FILESDIR= /etc/mtree

Modified: stable/10/lib/Makefile
==============================================================================
--- stable/10/lib/Makefile	Sat Dec 28 20:03:14 2013	(r260012)
+++ stable/10/lib/Makefile	Sat Dec 28 20:05:31 2013	(r260013)
@@ -127,7 +127,8 @@ SUBDIR=	${SUBDIR_ORDERED} \
 	libyaml \
 	libz \
 	${_atf} \
-	${_clang}
+	${_clang} \
+	${_tests}
 
 .if exists(${.CURDIR}/csu/${MACHINE_ARCH}-elf)
 _csu=csu/${MACHINE_ARCH}-elf
@@ -141,10 +142,6 @@ _csu=csu
 
 # NB: keep these sorted by MK_* knobs
 
-.if ${MK_ATF} != "no"
-_atf=		atf
-.endif
-
 .if ${MK_ATM} != "no"
 _libngatm=	libngatm
 .endif
@@ -254,6 +251,11 @@ _libsmutil=	libsmutil
 _libtelnet=	libtelnet
 .endif
 
+.if ${MK_TESTS} != "no"
+_atf=		atf
+_tests=		tests
+.endif
+
 .if ${MK_UNBOUND} != "no"
 _libunbound=	libunbound
 .endif

Modified: stable/10/lib/libcrypt/Makefile
==============================================================================
--- stable/10/lib/libcrypt/Makefile	Sat Dec 28 20:03:14 2013	(r260012)
+++ stable/10/lib/libcrypt/Makefile	Sat Dec 28 20:05:31 2013	(r260013)
@@ -37,4 +37,9 @@ WARNS?=		2
 
 PRECIOUSLIB=
 
+.if ${MK_TESTS} != "no"
+SUBDIR+=	tests
+.endif
+
 .include <bsd.lib.mk>
+.include <bsd.subdir.mk>

Modified: stable/10/lib/libcrypt/tests/Makefile
==============================================================================
--- stable/10/lib/libcrypt/tests/Makefile	Sat Dec 28 20:03:14 2013	(r260012)
+++ stable/10/lib/libcrypt/tests/Makefile	Sat Dec 28 20:05:31 2013	(r260013)
@@ -2,6 +2,8 @@
 
 # exercise libcrypt
 
+TESTSDIR= ${TESTSBASE}/lib/libcrypt
+
 ATF_TESTS_C= crypt_tests
 
 CFLAGS+= -I${.CURDIR:H}

Modified: stable/10/libexec/Makefile
==============================================================================
--- stable/10/libexec/Makefile	Sat Dec 28 20:03:14 2013	(r260012)
+++ stable/10/libexec/Makefile	Sat Dec 28 20:05:31 2013	(r260013)
@@ -33,10 +33,6 @@ SUBDIR=	${_atf} \
 	ulog-helper \
 	${_ypxfr}
 
-.if ${MK_ATF} != "no"
-_atf=		atf
-.endif
-
 .if ${MK_AT} != "no"
 _atrun=		atrun
 .endif
@@ -76,4 +72,8 @@ _smrsh=		smrsh
 _telnetd=	telnetd
 .endif
 
+.if ${MK_TESTS} != "no"
+_atf=		atf
+.endif
+
 .include <bsd.subdir.mk>

Modified: stable/10/share/doc/Makefile
==============================================================================
--- stable/10/share/doc/Makefile	Sat Dec 28 20:03:14 2013	(r260012)
+++ stable/10/share/doc/Makefile	Sat Dec 28 20:05:31 2013	(r260013)
@@ -9,7 +9,7 @@ SUBDIR=	${_IPv6} \
 	${_llvm} \
 	${_roffdocs}
 
-.if ${MK_ATF} != "no"
+.if ${MK_TESTS} != "no"
 _atf= atf
 .endif
 

Modified: stable/10/share/man/man1/Makefile
==============================================================================
--- stable/10/share/man/man1/Makefile	Sat Dec 28 20:03:14 2013	(r260012)
+++ stable/10/share/man/man1/Makefile	Sat Dec 28 20:05:31 2013	(r260013)
@@ -5,7 +5,7 @@
 
 MAN=	builtin.1 intro.1
 
-.if ${MK_ATF} != "no"
+.if ${MK_TESTS} != "no"
 ATF=	${.CURDIR}/../../../contrib/atf
 .PATH:	${ATF}/doc
 MAN+=	atf-test-program.1

Modified: stable/10/share/man/man4/Makefile
==============================================================================
--- stable/10/share/man/man4/Makefile	Sat Dec 28 20:03:14 2013	(r260012)
+++ stable/10/share/man/man4/Makefile	Sat Dec 28 20:05:31 2013	(r260013)
@@ -827,7 +827,7 @@ _nvram2env.4=	nvram2env.4
 SUBDIR=	man4.${MACHINE_CPUARCH}
 .endif
 
-.if ${MK_ATF} != "no"
+.if ${MK_TESTS} != "no"
 ATF=            ${.CURDIR}/../../../contrib/atf
 .PATH:          ${ATF}/doc
 _atf_test_case.4=	atf-test-case.4

Modified: stable/10/share/man/man7/Makefile
==============================================================================
--- stable/10/share/man/man7/Makefile	Sat Dec 28 20:03:14 2013	(r260012)
+++ stable/10/share/man/man7/Makefile	Sat Dec 28 20:05:31 2013	(r260013)
@@ -29,6 +29,10 @@ MAN=	adding_user.7 \
 	sticky.7 \
 	tuning.7
 
+.if ${MK_TESTS} != "no"
+MAN+=	tests.7
+.endif
+
 MLINKS=	intro.7 miscellaneous.7
 MLINKS+= security.7 securelevel.7
 MLINKS+= c99.7 c.7

Modified: stable/10/share/man/man7/hier.7
==============================================================================
--- stable/10/share/man/man7/hier.7	Sat Dec 28 20:03:14 2013	(r260012)
+++ stable/10/share/man/man7/hier.7	Sat Dec 28 20:05:31 2013	(r260013)
@@ -702,6 +702,12 @@ source code for files in
 source code for files in
 .Pa /usr/sbin
 .El
+.Pp
+.It Pa tests/
+The
+.Fx
+test suite.
+See tests(7) for more details.
 .El
 .It Pa /var/
 multi-purpose log, temporary, transient, and spool files

Copied: stable/10/share/man/man7/tests.7 (from r257100, head/share/man/man7/tests.7)
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ stable/10/share/man/man7/tests.7	Sat Dec 28 20:05:31 2013	(r260013, copy of r257100, head/share/man/man7/tests.7)
@@ -0,0 +1,199 @@
+.\"	$FreeBSD$
+.\"	$NetBSD: tests.kyua.7,v 1.2 2013/07/20 21:39:59 wiz Exp $
+.\"
+.\" Copyright (c) 2010 The NetBSD Foundation, Inc.
+.\" All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\"    notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\"    notice, this list of conditions and the following disclaimer in the
+.\"    documentation and/or other materials provided with the distribution.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND
+.\" CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
+.\" INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+.\" MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+.\" IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS BE LIABLE FOR ANY
+.\" DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
+.\" GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+.\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
+.\" IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+.\" OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
+.\" IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+.\"
+.Dd October 19, 2013
+.Dt TESTS 7
+.Os
+.Sh NAME
+.Nm tests
+.Nd introduction to the FreeBSD test suite
+.Sh DESCRIPTION
+The
+.Fx
+test suite provides a collection of automated tests for two major purposes.
+On the one hand, the test suite aids
+.Em developers
+in catching bugs and regressions in the code when they performing modifications
+to the source tree.
+On the other hand, the test suite allows
+.Em end users
+(and, in particular, system administrators) to verify that fresh installations
+of the
+.Fx
+operating system behave correctly in their hardware platform and also to ensure
+that the system does not suffer from regressions during regular system
+operation and maintenance.
+.Pp
+The
+.Fx
+test suite is installed under the
+.Pa /usr/tests
+hierarchy.
+.Pp
+This manual page describes how to execute the test suite and how to configure
+some of its optional features.
+.Ss When to run the tests?
+Before diving into the details of how to run the test suite, here are some
+scenarios in which you should be running them:
+.Bl -bullet -offset indent
+.It
+After a fresh installation of
+.Fx
+to ensure that the system works correctly on your hardware platform.
+.It
+After an upgrade of
+.Fx
+to a different version to ensure that the new code works well on your
+hardware platform and that the upgrade did not introduce regressions in your
+configuration.
+.It
+After performing changes to the source tree to catch any bugs and/or regressions
+introduced by the modifications.
+.It
+Periodically, maybe from a
+.Xr cron 8
+job, to ensure that any changes to the system (such as the installation of
+third-party packages or manual modifications to configuration files) do not
+introduce unexpected failures.
+.El
+.Ss Running the tests
+First of all, you will need to install the
+.Sq ports/devel/kyua
+package.
+.Pp
+Use the following command to run the whole test suite:
+.Bd -literal -offset indent
+$ kyua test -k /usr/tests/Kyuafile
+.Ed
+.Pp
+The above will go through all test programs in
+.Pa /usr/tests
+recursively, execute them, store their results and debugging data in Kyua
+database (by default in
+.Pa ~/.kyua/store.db ) ,
+and print a summary of the results.
+This summary includes a brief count of all total tests run and how many of
+them failed.
+.Pp
+It is possible to restrict which tests to run by providing their names in
+the command line.
+For example, this would execute the tests for the
+.Xr cp 1
+and
+.Xr cut 1
+utilities:
+.Bd -literal -offset indent
+$ kyua test -k /usr/tests/Kyuafile bin/cp usr.bin/cut
+.Ed
+.Ss Obtaining reports of the tests execution
+Additional information of the results of the execution can be later extracted
+from the database by using the various reporting commands of Kyua.
+For example, the following would extract a plain-text report of the executed
+tests and show which ones failed:
+.Bd -literal -offset indent
+$ kyua report
+.Ed
+.Pp
+This other example would generate an HTML report ready to be published on a
+web server:
+.Bd -literal -offset indent
+$ kyua report-html --output ~/public_html/tests
+.Ed
+.Pp
+For further details on the command-line interface of Kyua, please refer
+to its manual page
+.Xr kyua 1 .
+.\".Ss Configuring the tests
+.\"Some test cases in the
+.\".Fx
+.\"test suite require the administrator to manually set up some configuration
+.\"properties before they can run.
+.\"Unless these properties are defined, the tests that require them will be marked
+.\"as skipped and thus they will not be really executed.
+.\".Pp
+.\"Test suites are configured by defining the values to their configuration
+.\"variables in
+.\".Pa /usr/local/etc/kyua/kyua.conf .
+.\"The format of this file is detailed in
+.\".Xr kyua.conf 5 .
+.\".Pp
+.\"The following configuration variables are available in the
+.\".Fx
+.\"test suite:
+.\".Bl -tag
+.\".It NONE REGISTERED YET
+.\"TBD.
+.Ss What to do if something fails?
+If there is
+.Em any failure
+during the execution of the test suite, please considering reporting it to the
+.Fx
+developers so that the failure can be analyzed and fixed.
+To do so, either send a message to the appropriate mailing list or file a
+problem report.
+For more details please refer to:
+.Bl -bullet -offset indent -compact
+.It
+.Lk http://lists.freebsd.org/ "FreeBSD Mailing Lists"
+.It
+.Lk http://www.freebsd.org/send-pr.html "Submit a FreeBSD Problem Report"
+.El
+.Sh FILES
+.Bl -tag -compact -width usrXlocalXetcXkyuaXkyuaXconfXX
+.It Pa /usr/local/etc/kyua/kyua.conf
+System-wide configuration file for
+.Xr kyua 1 .
+.It Pa ~/.kyua/kyua.conf
+User-specific configuration file for
+.Xr kyua 1 ;
+overrides the system file.
+.It Pa ~/.kyua/store.db
+Default database used by Kyua to maintain the data of the executed tests.
+.It Pa /usr/tests/
+Location of the
+.Fx
+test suite.
+.It Pa /usr/tests/Kyuafile
+Top-level test suite definition file.
+.El
+.Sh SEE ALSO
+.Xr kyua 1 .
+.Sh HISTORY
+The collection of test programs in
+.Pa /usr/tests
+first appeared in
+.Fx 11.0 .
+.Pp
+The
+.Nm
+manual page first appeared in
+.Nx 6.0
+and was later ported to
+.Fx 11.0 .
+.Sh AUTHORS
+.An Julio Merino Aq Mt jmmv@google.com

Modified: stable/10/share/mk/Makefile
==============================================================================
--- stable/10/share/mk/Makefile	Sat Dec 28 20:03:14 2013	(r260012)
+++ stable/10/share/mk/Makefile	Sat Dec 28 20:05:31 2013	(r260013)
@@ -43,7 +43,7 @@ FILES=	\
 NO_OBJ=
 FILESDIR=	${BINDIR}/mk
 
-.if ${MK_ATF} != "no"
+.if ${MK_TESTS} != "no"
 FILES+=	atf.test.mk
 FILES+=	plain.test.mk
 FILES+=	tap.test.mk

Modified: stable/10/share/mk/bsd.own.mk
==============================================================================
--- stable/10/share/mk/bsd.own.mk	Sat Dec 28 20:03:14 2013	(r260012)
+++ stable/10/share/mk/bsd.own.mk	Sat Dec 28 20:05:31 2013	(r260013)
@@ -376,6 +376,7 @@ __DEFAULT_NO_OPTIONS = \
     PKGTOOLS \
     SHARED_TOOLCHAIN \
     SVN \
+    TESTS \
     USB_GADGET_EXAMPLES
 
 #
@@ -555,6 +556,20 @@ MK_CLANG_FULL:= no
 MK_LLDB:= no
 .endif
 
+.if defined(NO_TESTS)
+# This should be handled above along the handling of all other NO_*  options.
+# However, the above is broken when WITH_*=yes are passed to make(1) as
+# command line arguments.  See PR bin/183762.
+#
+# Because the TESTS option is new and it will default to yes, it's likely
+# that people will pass WITHOUT_TESTS=yes to make(1) directly and get a broken
+# build.  So, just in case, it's better to explicitly handle this case here.
+#
+# TODO(jmmv): Either fix make to allow us putting this override where it
+# belongs above or fix this file to cope with the make bug.
+MK_TESTS:= no
+.endif
+
 #
 # Set defaults for the MK_*_SUPPORT variables.
 #

Modified: stable/10/tests/Makefile
==============================================================================
--- head/tests/Makefile	Fri Oct 25 05:25:19 2013	(r257097)
+++ stable/10/tests/Makefile	Sat Dec 28 20:05:31 2013	(r260013)
@@ -2,10 +2,9 @@
 
 .include <bsd.own.mk>
 
-TESTS_SUBDIRS= lib
+SUBDIR= # still empty
 
 TESTSDIR= ${TESTSBASE}
-
 KYUAFILE= yes
 
 .include <bsd.test.mk>

Modified: stable/10/tests/README
==============================================================================
--- head/tests/README	Fri Oct 25 05:25:19 2013	(r257097)
+++ stable/10/tests/README	Sat Dec 28 20:05:31 2013	(r260013)
@@ -44,13 +44,12 @@ tree-- the top-level Kyuafile does not k
 exist upfront.  Instead, such Kyuafile automatically detects, at
 run-time, which */Kyuafile files exist and uses those directly.
 
-Similarly, every category subdirectory within src/tests/ provides the
-same Kyuafile with auto-discovery features.  For example: src/tests/lib/
-holds a generic Makefile to install test-suite related material but such
-directory does not know upfront which libraries within src/lib/ will
-install tests.  For this reason, the Kyuafile in src/tests/lib/ has to
-also use the auto-discovery features.  The same applies for any other
-category subdirectory (e.g. bin, usr.sbin, etc.).
+Similarly, every directory in src/ that wants to install a Kyuafile to
+just recurse into other subdirectories reuses this Kyuafile with
+auto-discovery features.  As an example, take a look at src/lib/tests/
+whose sole purpose is to install a Kyuafile into /usr/tests/lib/.
+The goal in this specific case is for /usr/tests/lib/ to be generated
+entirely from src/lib/.
 
 -- 
 $FreeBSD$

Modified: stable/10/tools/build/mk/OptionalObsoleteFiles.inc
==============================================================================
--- stable/10/tools/build/mk/OptionalObsoleteFiles.inc	Sat Dec 28 20:03:14 2013	(r260012)
+++ stable/10/tools/build/mk/OptionalObsoleteFiles.inc	Sat Dec 28 20:05:31 2013	(r260013)
@@ -68,56 +68,6 @@ OLD_FILES+=usr/share/man/man1/batch.1.gz
 OLD_FILES+=usr/share/man/man8/atrun.8.gz
 .endif
 
-.if ${MK_ATF} == no
-OLD_FILES+=usr/bin/atf-sh
-OLD_DIRS+=usr/include/atf-c
-OLD_FILES+=usr/include/atf-c/build.h
-OLD_FILES+=usr/include/atf-c/check.h
-OLD_FILES+=usr/include/atf-c/config.h
-OLD_FILES+=usr/include/atf-c/defs.h
-OLD_FILES+=usr/include/atf-c/error.h
-OLD_FILES+=usr/include/atf-c/error_fwd.h
-OLD_FILES+=usr/include/atf-c/macros.h
-OLD_FILES+=usr/include/atf-c/tc.h
-OLD_FILES+=usr/include/atf-c/tp.h
-OLD_FILES+=usr/include/atf-c/utils.h
-OLD_FILES+=usr/include/atf-c/atf-c.h
-OLD_FILES+=usr/include/atf-c.h
-OLD_DIRS+=usr/include/atf-c++
-OLD_FILES+=usr/include/atf-c++/build.hpp
-OLD_FILES+=usr/include/atf-c++/check.hpp
-OLD_FILES+=usr/include/atf-c++/config.hpp
-OLD_FILES+=usr/include/atf-c++/macros.hpp
-OLD_FILES+=usr/include/atf-c++/tests.hpp
-OLD_FILES+=usr/include/atf-c++/utils.hpp
-OLD_FILES+=usr/include/atf-c++/atf-c++.hpp
-OLD_FILES+=usr/include/atf-c++.hpp
-OLD_FILES+=usr/lib/libatf-c_p.a
-OLD_FILES+=usr/lib/libatf-c.so.1
-OLD_FILES+=usr/lib/libatf-c.so
-OLD_FILES+=usr/lib/libatf-c++.a
-OLD_FILES+=usr/lib/libatf-c++_p.a
-OLD_FILES+=usr/lib/libatf-c++.so.1
-OLD_FILES+=usr/lib/libatf-c++.so
-OLD_FILES+=usr/lib/libatf-c.a
-OLD_FILES+=usr/libexec/atf-check
-OLD_DIRS+=usr/share/atf
-OLD_FILES+=usr/share/atf/libatf-sh.subr
-OLD_DIRS+=usr/share/doc/atf
-OLD_FILES+=usr/share/doc/atf/AUTHORS
-OLD_FILES+=usr/share/doc/atf/COPYING
-OLD_FILES+=usr/share/doc/atf/NEWS
-OLD_FILES+=usr/share/doc/atf/README
-OLD_FILES+=usr/share/man/man1/atf-check.1.gz
-OLD_FILES+=usr/share/man/man1/atf-sh.1.gz
-OLD_FILES+=usr/share/man/man1/atf-test-program.1.gz
-OLD_FILES+=usr/share/man/man3/atf-c-api.3.gz
-OLD_FILES+=usr/share/man/man3/atf-c++-api.3.gz
-OLD_FILES+=usr/share/man/man3/atf-sh-api.3.gz
-OLD_FILES+=usr/share/man/man4/atf-test-case.4.gz
-OLD_FILES+=usr/share/mk/atf.test.mk
-.endif
-
 .if ${MK_ATM} == no
 OLD_FILES+=rescue/atmconfig
 OLD_FILES+=sbin/atmconfig
@@ -4141,6 +4091,61 @@ OLD_FILES+=usr/share/man/man1/telnet.1.g
 OLD_FILES+=usr/share/man/man8/telnetd.8.gz
 .endif
 
+.if ${MK_TESTS} == no
+# ATF libraries.
+OLD_FILES+=usr/bin/atf-sh
+OLD_DIRS+=usr/include/atf-c
+OLD_FILES+=usr/include/atf-c/build.h
+OLD_FILES+=usr/include/atf-c/check.h
+OLD_FILES+=usr/include/atf-c/config.h
+OLD_FILES+=usr/include/atf-c/defs.h
+OLD_FILES+=usr/include/atf-c/error.h
+OLD_FILES+=usr/include/atf-c/error_fwd.h
+OLD_FILES+=usr/include/atf-c/macros.h
+OLD_FILES+=usr/include/atf-c/tc.h
+OLD_FILES+=usr/include/atf-c/tp.h
+OLD_FILES+=usr/include/atf-c/utils.h
+OLD_FILES+=usr/include/atf-c.h
+OLD_DIRS+=usr/include/atf-c++
+OLD_FILES+=usr/include/atf-c++/build.hpp
+OLD_FILES+=usr/include/atf-c++/check.hpp
+OLD_FILES+=usr/include/atf-c++/config.hpp
+OLD_FILES+=usr/include/atf-c++/macros.hpp
+OLD_FILES+=usr/include/atf-c++/tests.hpp
+OLD_FILES+=usr/include/atf-c++/utils.hpp
+OLD_FILES+=usr/include/atf-c++.hpp
+OLD_FILES+=usr/lib/libatf-c_p.a
+OLD_FILES+=usr/lib/libatf-c.so.1
+OLD_FILES+=usr/lib/libatf-c.so
+OLD_FILES+=usr/lib/libatf-c++.a
+OLD_FILES+=usr/lib/libatf-c++_p.a
+OLD_FILES+=usr/lib/libatf-c++.so.1
+OLD_FILES+=usr/lib/libatf-c++.so
+OLD_FILES+=usr/lib/libatf-c.a
+OLD_FILES+=usr/libexec/atf-check
+OLD_DIRS+=usr/share/atf
+OLD_FILES+=usr/share/atf/libatf-sh.subr
+OLD_DIRS+=usr/share/doc/atf
+OLD_FILES+=usr/share/doc/atf/AUTHORS
+OLD_FILES+=usr/share/doc/atf/COPYING
+OLD_FILES+=usr/share/doc/atf/NEWS
+OLD_FILES+=usr/share/doc/atf/README
+OLD_FILES+=usr/share/man/man1/atf-check.1.gz
+OLD_FILES+=usr/share/man/man1/atf-sh.1.gz
+OLD_FILES+=usr/share/man/man1/atf-test-program.1.gz
+OLD_FILES+=usr/share/man/man3/atf-c-api.3.gz
+OLD_FILES+=usr/share/man/man3/atf-c++-api.3.gz
+OLD_FILES+=usr/share/man/man3/atf-sh-api.3.gz
+OLD_FILES+=usr/share/man/man4/atf-test-case.4.gz
+OLD_FILES+=usr/share/mk/atf.test.mk
+
+# Test suite.
+TESTS_DIRS!=find ${DESTDIR}/usr/tests -type d | sed -e 's,^${DESTDIR}/,,'
+OLD_DIRS+=${TESTS_DIRS}
+TESTS_FILES!=find ${DESTDIR}/usr/tests \! -type d | sed -e 's,^${DESTDIR}/,,'
+OLD_FILES+=${TESTS_FILES}
+.endif
+
 #.if ${MK_TOOLCHAIN} == no
 # to be filled in
 #.endif

Copied: stable/10/tools/build/options/WITHOUT_TESTS (from r257098, head/tools/build/options/WITHOUT_TESTS)
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ stable/10/tools/build/options/WITHOUT_TESTS	Sat Dec 28 20:05:31 2013	(r260013, copy of r257098, head/tools/build/options/WITHOUT_TESTS)
@@ -0,0 +1,2 @@
+.\" $FreeBSD$
+Set to not build any test programs nor install them in /usr/tests.

Modified: stable/10/usr.bin/Makefile
==============================================================================
--- stable/10/usr.bin/Makefile	Sat Dec 28 20:03:14 2013	(r260012)
+++ stable/10/usr.bin/Makefile	Sat Dec 28 20:05:31 2013	(r260013)
@@ -210,10 +210,6 @@ SUBDIR=	alias \
 SUBDIR+=	at
 .endif
 
-.if ${MK_ATF} != "no"
-_atf=		atf
-.endif
-
 .if ${MK_ATM} != "no"
 SUBDIR+=	atm
 .endif
@@ -332,6 +328,10 @@ SUBDIR+=	vacation
 SUBDIR+=	telnet
 .endif
 
+.if ${MK_TESTS} != "no"
+_atf=		atf
+.endif
+
 .if ${MK_TEXTPROC} != "no"
 SUBDIR+=	checknr
 SUBDIR+=	colcrt



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201312282005.rBSK5Vx6033981>