mk: add PLAIN_TESTS_PORCH support

porch(1), available via sysutils/porch, is an expect(1)-like program
that uses lua instead of tcl for scripting.  Imminent use will be to
execute tests of tty canonicalization to ensure we don't regress some of
the corner cases we've fixed, but tests for other interactive programs
are being considered as well.

PLAIN_TESTS_PORCH is being introduced primarily to get the metadata
right without writing it out for every single test; required_programs
ensures that we skip the tests if the port is not installed.

Reviewed by:	0mp (previous version), ngie
Differential Revision:	https://reviews.freebsd.org/D46805
This commit is contained in:
Kyle Evans 2024-10-20 20:31:50 -05:00
parent 87bf66d4a7
commit 44f736c385
2 changed files with 14 additions and 0 deletions

View file

@ -701,6 +701,9 @@ 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_PORCH The names of the plain (legacy) porch(1)-based
test programs to build.
PLAIN_TESTS_SH The names of the plain (legacy) test programs to build.
TAP_PERL_INTERPRETER

View file

@ -43,6 +43,17 @@ TEST_INTERFACE.${_T}= plain
.endfor
.endif
.if !empty(PLAIN_TESTS_PORCH)
SCRIPTS+= ${PLAIN_TESTS_PORCH:S/$/.orch/}
_TESTS+= ${PLAIN_TESTS_PORCH}
.for _T in ${PLAIN_TESTS_PORCH}
SCRIPTSDIR_${_T}.orch= ${TESTSDIR}
TEST_INTERFACE.${_T}= plain
TEST_METADATA.${_T}+= required_programs="porch"
.endfor
.endif
.if !empty(PLAIN_TESTS_SH)
SCRIPTS+= ${PLAIN_TESTS_SH}
_TESTS+= ${PLAIN_TESTS_SH}