Changeset View
Changeset View
Standalone View
Standalone View
share/mk/suite.test.mk
Show First 20 Lines • Show All 71 Lines • ▼ Show 20 Lines | @echo '${TEST_INTERFACE.${_T}}_test_program{name="${_T}"${_TEST_METADATA.${_T}:C/$/,/:tW:C/^/, /W:C/,$//W}}' \ | ||||
>>${.TARGET}.tmp | >>${.TARGET}.tmp | ||||
.endfor | .endfor | ||||
.for _T in ${TESTS_SUBDIRS:N.WAIT} | .for _T in ${TESTS_SUBDIRS:N.WAIT} | ||||
@echo "include(\"${_T}/${.TARGET}\")" >>${.TARGET}.tmp | @echo "include(\"${_T}/${.TARGET}\")" >>${.TARGET}.tmp | ||||
.endfor | .endfor | ||||
@mv ${.TARGET}.tmp ${.TARGET} | @mv ${.TARGET}.tmp ${.TARGET} | ||||
.endif | .endif | ||||
KYUA= ${LOCALBASE}/bin/kyua | KYUA?= kyua | ||||
# Definition of the "make check" target and supporting variables. | # Definition of the "make check" target and supporting variables. | ||||
# | # | ||||
# This target, by necessity, can only work for native builds (i.e. a FreeBSD | # This target, by necessity, can only work for native builds (i.e. a FreeBSD | ||||
# host building a release for the same system). The target runs Kyua, which is | # host building a release for the same system). The target runs Kyua, which is | ||||
# not in the toolchain, and the tests execute code built for the target host. | # not in the toolchain, and the tests execute code built for the target host. | ||||
# | # | ||||
# Due to the dependencies of the binaries built by the source tree and how they | # Due to the dependencies of the binaries built by the source tree and how they | ||||
# are used by tests, it is highly possible for a execution of "make test" to | # are used by tests, it is highly possible for a execution of "make test" to | ||||
# report bogus results unless the new binaries are put in place. | # report bogus results unless the new binaries are put in place. | ||||
realcheck: .PHONY | realcheck: .PHONY | ||||
@if [ ! -x ${KYUA} ]; then \ | if ! which -s "${KYUA}"; then \ | ||||
echo; \ | echo; \ | ||||
echo "kyua binary not installed at expected location (${.TARGET})"; \ | echo "kyua binary not installed at expected location (${.TARGET})"; \ | ||||
echo; \ | echo; \ | ||||
echo "Please install via pkg install, or specify the path to the kyua"; \ | echo "Please install via pkg install, or specify the path to the kyua"; \ | ||||
echo "package via the \$${LOCALBASE} variable, e.g. "; \ | echo "binary via the \$${KYUA} variable, e.g. "; \ | ||||
ngie: Grammar nit: e.g. must be followed by a comma: `, e.g., `. | |||||
echo "LOCALBASE=\"${LOCALBASE}\""; \ | echo "KYUA=\"${LOCALBASE}/bin/kyua\""; \ | ||||
false; \ | false; \ | ||||
fi | fi | ||||
@env ${TESTS_ENV:Q} ${KYUA} test -k ${DESTDIR}${TESTSDIR}/Kyuafile | @env ${TESTS_ENV:Q} ${KYUA} test -k ${DESTDIR}${TESTSDIR}/Kyuafile | ||||
MAKE_CHECK_SANDBOX_DIR= checkdir | MAKE_CHECK_SANDBOX_DIR= checkdir | ||||
CLEANDIRS+= ${MAKE_CHECK_SANDBOX_DIR} | CLEANDIRS+= ${MAKE_CHECK_SANDBOX_DIR} | ||||
.if ${MK_MAKE_CHECK_USE_SANDBOX} != "no" && make(check) | .if ${MK_MAKE_CHECK_USE_SANDBOX} != "no" && make(check) | ||||
Show All 19 Lines |
Grammar nit: e.g. must be followed by a comma: , e.g., .