Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 15 Mar 2014 09:27:59 +0000 (UTC)
From:      Julio Merino <jmmv@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r263204 - head/share/mk
Message-ID:  <201403150927.s2F9Rxh5090655@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: jmmv
Date: Sat Mar 15 09:27:59 2014
New Revision: 263204
URL: http://svnweb.freebsd.org/changeset/base/263204

Log:
  Add some documentation for bsd.test.mk.

Modified:
  head/share/mk/bsd.README

Modified: head/share/mk/bsd.README
==============================================================================
--- head/share/mk/bsd.README	Sat Mar 15 06:49:32 2014	(r263203)
+++ head/share/mk/bsd.README	Sat Mar 15 09:27:59 2014	(r263204)
@@ -39,6 +39,7 @@ bsd.prog.mk		- building programs from so
 bsd.snmpmod.mk		- building modules for the SNMP daemon bsnmpd
 bsd.subdir.mk		- targets for building subdirectories
 bsd.sys.mk		- common settings used for building FreeBSD sources
+bsd.test.mk		- building test programs from source files
 sys.mk			- default rules for all makes
 
 This file does not document bsd.port*.mk.  They are documented in ports(7).
@@ -365,3 +366,86 @@ It has rules for building profiled objec
 built by default.
 
 Libraries are ranlib'd before installation.
+
+=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
+
+The include file <bsd.test.mk> handles building one or more test programs
+intended to be used in the FreeBSD Test Suite under /usr/tests/.
+
+It has seven targets:
+
+	all:
+		build the test programs.
+	clean:
+		remove the test programs and any object files.
+	cleandir:
+		remove all of the files removed by the target clean, as
+		well as .depend and tags.
+	depend:
+		make the dependencies for the source files, and store
+		them in the file .depend.
+	install:
+                install the test programs and their data files; if the
+                Makefile does not itself define the target install, the
+                targets beforeinstall and afterinstall may also be used
+                to cause actions immediately before and after the
+                install target is executed.
+	lint:
+		run lint on the source files.
+	tags:
+		create a tags file for the source files.
+	test:
+		runs the test programs from the object directory; if the
+		Makefile does not itself define the target test, the
+		targets beforetest and aftertest may also be used to
+		cause actions immediately before and after the test
+		target is executed.
+
+It sets/uses the following variables, among many others:
+
+TESTDIR		Path to the installed tests.  Must be a subdirectory of
+		TESTSBASE and the subpath should match the relative
+		location of the tests within the src tree.
+
+KYUAFILE	If 'auto' (the default), generate a Kyuafile out of the
+		test programs defined in the Makefile.  If 'yes', then a
+		manually-crafted Kyuafile must be supplied with the
+		sources.  If 'no', no Kyuafile is installed (useful for
+		subdirectories providing helper programs or data files
+		only).
+
+ATF_TESTS_C	The names of the ATF C test programs to build.
+
+ATF_TESTS_CXX	The names of the ATF C++ test programs to build.
+
+ATF_TESTS_SH	The names of the ATF sh test programs to build.
+
+PLAIN_TESTS_C	The names of the plain (legacy) programs to build.
+
+PLAIN_TESTS_CXX	The names of the plain (legacy) test programs to build.
+
+PLAIN_TESTS_SH	The names of the plain (legacy) test programs to build.
+
+TAP_TESTS_C	The names of the TAP-compliant C test programs to build.
+
+TAP_TESTS_CXX	The names of the TAP-compliant C++ test programs to
+		build.
+
+TAP_TESTS_SH	The names of the TAP-compliant sh test programs to
+		build.
+
+TESTS_SUBDIRS	List of subdirectories containing tests into which to
+		recurse.  Differs from SUBDIR in that these directories
+		get registered into the automatically-generated
+		Kyuafile (if any).
+
+NOT_FOR_TEST_SUITE
+		If defined, none of the built test programs get
+		installed under /usr/tests/ and no Kyuafile is
+		automatically generated.  Should not be used within the
+		FreeBSD source tree but is provided for the benefit of
+		third-parties.
+
+The actual building of the test programs is performed by <bsd.prog.mk>.
+Please see the documentation above for this other file for additional
+details on the behavior of <bsd.test.mk>.



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