Index: etc/mtree/BSD.tests.dist =================================================================== --- etc/mtree/BSD.tests.dist +++ etc/mtree/BSD.tests.dist @@ -419,6 +419,8 @@ atf atf-check .. + atf-lua + .. atf-sh .. .. Index: libexec/atf/atf-lua/Makefile =================================================================== --- libexec/atf/atf-lua/Makefile +++ libexec/atf/atf-lua/Makefile @@ -1,5 +1,6 @@ # $FreeBSD$ +.include .include ATF= ${SRCTOP}/contrib/atf @@ -24,5 +25,8 @@ LDFLAGS+= -Wl,-E LIBADD= lua +HAS_TESTS= +SUBDIR.${MK_TESTS}+= tests + .include "../../../lib/atf/common.mk" .include Index: libexec/atf/atf-lua/tests/Makefile =================================================================== --- /dev/null +++ libexec/atf/atf-lua/tests/Makefile @@ -0,0 +1,27 @@ +# $FreeBSD$ + +.include + +ATF= ${SRCTOP}/contrib/atf +.PATH: ${ATF}/atf-lua + +ATF_TESTS_LUA+= latf_test + +ATF_TESTS_SH+= config_test +ATF_TESTS_SH+= integration_test +ATF_TESTS_SH+= tc_test + +integration_test: Makefile +ATF_TESTS_SH_SED_integration_test= \ + -e 's,__ATF_LUA__,/usr/libexec/atf-lua,g' + +SCRIPTS+= misc_helpers +SCRIPTSDIR_misc_helpers=${TESTSDIR} +CLEANFILES+= misc_helpers misc_helpers.tmp +misc_helpers: misc_helpers.lua + echo '#! /usr/libexec/atf-lua' >${.TARGET}.tmp + cat ${.ALLSRC} >>${.TARGET}.tmp + chmod +x ${.TARGET}.tmp + mv ${.TARGET}.tmp ${.TARGET} + +.include