Changeset View
Changeset View
Standalone View
Standalone View
share/mk/bsd.README
Show First 20 Lines • Show All 442 Lines • ▼ Show 20 Lines | |||||
The include file <bsd.test.mk> handles building one or more test programs | 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/. | intended to be used in the FreeBSD Test Suite under /usr/tests/. | ||||
It has seven targets: | It has seven targets: | ||||
all: | all: | ||||
build the test programs. | build the test programs. | ||||
check: | |||||
runs the test programs from CHECKDIR with kyua test, if the | |||||
Makefile does not define the check target. | |||||
ngie: "the check target" should be "the realcheck target". | |||||
The beforecheck and aftercheck targets will be invoked, if | |||||
defined, to execute commands before and after the check | |||||
target has been executed, respectively. | |||||
The devel/kyua package must be installed before invoking this | |||||
target. | |||||
See CHECKDIR for more details. | |||||
clean: | clean: | ||||
remove the test programs and any object files. | remove the test programs and any object files. | ||||
cleandir: | cleandir: | ||||
remove all of the files removed by the target clean, as | remove all of the files removed by the target clean, as | ||||
well as .depend and tags. | well as .depend and tags. | ||||
depend: | depend: | ||||
make the dependencies for the source files, and store | make the dependencies for the source files, and store | ||||
them in the file .depend. | them in the file .depend. | ||||
install: | install: | ||||
install the test programs and their data files; if the | install the test programs and their data files; if the | ||||
Makefile does not itself define the target install, the | Makefile does not itself define the target install, the | ||||
targets beforeinstall and afterinstall may also be used | targets beforeinstall and afterinstall may also be used | ||||
to cause actions immediately before and after the | to cause actions immediately before and after the | ||||
install target is executed. | install target is executed. | ||||
lint: | lint: | ||||
run lint on the source files. | run lint on the source files. | ||||
tags: | tags: | ||||
create a tags file for the source files. | 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: | It sets/uses the following variables, among many others: | ||||
TESTSBASE Installation prefix for tests. Defaults to /usr/tests | TESTSBASE Installation prefix for tests. Defaults to /usr/tests | ||||
TESTSDIR Path to the installed tests. Must be a subdirectory of | TESTSDIR Path to the installed tests. Must be a subdirectory of | ||||
TESTSBASE and the subpath should match the relative | TESTSBASE and the subpath should match the relative | ||||
location of the tests within the src tree. | location of the tests within the src tree. | ||||
The value of TESTSDIR defaults to | The value of TESTSDIR defaults to | ||||
${TESTSBASE}/${RELDIR:H} , e.g. /usr/tests/bin/ls when | ${TESTSBASE}/${RELDIR:H} , e.g. /usr/tests/bin/ls when | ||||
included from bin/ls/tests . | included from bin/ls/tests . | ||||
CHECKDIR The value of CHECKDIR defaults to TESTSDIR when make check is | |||||
run from the top-level directory. Conversely, the value of | |||||
Done Inline ActionsThe note about it defaulting to TESTSDIR needs to be deleted. This was something I was considering that didn't pan out implementation wise. ngie: The note about it defaulting to TESTSDIR needs to be deleted. This was something I was… | |||||
CHECKDIR defaults to .OBJDIR when make check is not run from | |||||
the top-level directory. | |||||
KYUAFILE If 'auto' (the default), generate a Kyuafile out of the | KYUAFILE If 'auto' (the default), generate a Kyuafile out of the | ||||
test programs defined in the Makefile. If 'yes', then a | test programs defined in the Makefile. If 'yes', then a | ||||
manually-crafted Kyuafile must be supplied with the | manually-crafted Kyuafile must be supplied with the | ||||
sources. If 'no', no Kyuafile is installed (useful for | sources. If 'no', no Kyuafile is installed (useful for | ||||
subdirectories providing helper programs or data files | subdirectories providing helper programs or data files | ||||
only). | only). | ||||
LOCALBASE The --prefix for the kyua package. | |||||
Done Inline Actionsthis is not just for kyua, also doxygen as above emaste: this is not just for kyua, also doxygen as above | |||||
Done Inline ActionsRight, but this section's for bsd.test.mk. ngie: Right, but this section's for bsd.test.mk. | |||||
The value of LOCALBASE defaults to /usr/local . | |||||
ATF_TESTS_C The names of the ATF C test programs to build. | 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_CXX The names of the ATF C++ test programs to build. | ||||
ATF_TESTS_SH The names of the ATF sh 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_C The names of the plain (legacy) programs to build. | ||||
Show All 39 Lines |
"the check target" should be "the realcheck target".