Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F177856424
D61785.1795438727.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Authored By
Unknown
Size
1 KB
Referenced Files
None
Subscribers
None
D61785.1795438727.diff
View Options
diff --git a/share/mk/tap.test.mk b/share/mk/tap.test.mk
--- a/share/mk/tap.test.mk
+++ b/share/mk/tap.test.mk
@@ -21,9 +21,13 @@
# manpage.
TAP_TESTS_C?=
TAP_TESTS_CXX?=
+TAP_TESTS_LUA?=
TAP_TESTS_PERL?=
TAP_TESTS_SH?=
+# Lua interpreter to use.
+TAP_LUA_INTERPRETER= /usr/bin/env -S LUAUNIT_OUTPUT=TAP /usr/libexec/flua
+
# Perl interpreter to use for test programs written in this language.
TAP_PERL_INTERPRETER?= ${LOCALBASE}/bin/perl
@@ -49,6 +53,29 @@
.endfor
.endif
+.if !empty(TAP_TESTS_LUA)
+SCRIPTS+= ${TAP_TESTS_LUA}
+_TESTS+= ${TAP_TESTS_LUA}
+.for _T in ${TAP_TESTS_LUA}
+SCRIPTSDIR_${_T}= ${TESTSDIR}
+TEST_INTERFACE.${_T}= tap
+TEST_METADATA.${_T}+= required_programs="${TAP_LUA_INTERPRETER}"
+CLEANFILES+= ${_T} ${_T}.tmp
+# TODO(jmmv): It seems to me that this SED and SRC functionality should
+# exist in bsd.prog.mk along the support for SCRIPTS. Move it there if
+# this proves to be useful within the tests.
+TAP_TESTS_LUA_SED_${_T}?= # empty
+TAP_TESTS_LUA_SRC_${_T}?= ${_T}.lua
+${_T}: ${TAP_TESTS_LUA_SRC_${_T}}
+ { \
+ echo '#! ${TAP_LUA_INTERPRETER}'; \
+ cat ${.ALLSRC:N*Makefile*} | sed ${TAP_TESTS_LUA_SED_${_T}}; \
+ } >${.TARGET}.tmp
+ chmod +x ${.TARGET}.tmp
+ mv ${.TARGET}.tmp ${.TARGET}
+.endfor
+.endif
+
.if !empty(TAP_TESTS_PERL)
SCRIPTS+= ${TAP_TESTS_PERL}
_TESTS+= ${TAP_TESTS_PERL}
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Mon, Nov 23, 12:58 PM (12 h, 19 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
41880303
Default Alt Text
D61785.1795438727.diff (1 KB)
Attached To
Mode
D61785: luaunit TAP test support
Attached
Detach File
Event Timeline