The branch stable/14 has been updated by kevans:

URL: 
https://cgit.FreeBSD.org/src/commit/?id=a2328a1338e0bd17fc4c751228ba49b6de4ca5ec

commit a2328a1338e0bd17fc4c751228ba49b6de4ca5ec
Author:     Kyle Evans <kev...@freebsd.org>
AuthorDate: 2024-10-21 01:31:50 +0000
Commit:     Kyle Evans <kev...@freebsd.org>
CommitDate: 2025-07-21 02:12:23 +0000

    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
    
    (cherry picked from commit 44f736c385f6b8d451feb9d6543220e8e61abcaa)
---
 share/mk/bsd.README    |  3 +++
 share/mk/plain.test.mk | 11 +++++++++++
 2 files changed, 14 insertions(+)

diff --git a/share/mk/bsd.README b/share/mk/bsd.README
index 24acc355b9b5..b68d7b66402d 100644
--- a/share/mk/bsd.README
+++ b/share/mk/bsd.README
@@ -702,6 +702,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
diff --git a/share/mk/plain.test.mk b/share/mk/plain.test.mk
index cc6d268185da..485a78f8ea47 100644
--- a/share/mk/plain.test.mk
+++ b/share/mk/plain.test.mk
@@ -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}

Reply via email to