summaryrefslogtreecommitdiff
path: root/lang
diff options
context:
space:
mode:
authornia <nia@pkgsrc.org>2022-03-06 09:13:44 +0000
committernia <nia@pkgsrc.org>2022-03-06 09:13:44 +0000
commit14c775bc4b80ee055300643c55fcc6ad639c020a (patch)
tree4fde83b26242007f3d0fbd0a736eb0f9956fefdd /lang
parent2807cd60095489af89e0c6043d26cbef697439c4 (diff)
downloadpkgsrc-14c775bc4b80ee055300643c55fcc6ad639c020a.tar.gz
lua/module.mk: Allow passing arguments to busted
Diffstat (limited to 'lang')
-rw-r--r--lang/lua/module.mk13
1 files changed, 10 insertions, 3 deletions
diff --git a/lang/lua/module.mk b/lang/lua/module.mk
index f9900d7b0e1..bc5cb26efb3 100644
--- a/lang/lua/module.mk
+++ b/lang/lua/module.mk
@@ -1,4 +1,4 @@
-# $NetBSD: module.mk,v 1.13 2022/02/19 20:39:58 nia Exp $
+# $NetBSD: module.mk,v 1.14 2022/03/06 09:13:44 nia Exp $
#
# This Makefile fragment is intended to be included by packages that
# install Lua modules.
@@ -19,7 +19,10 @@
# Use busted to run tests and provide a do-test target.
#
# Possible values: yes no
-# Default: yes
+# Default: no
+#
+# LUA_BUSTED_ARGS
+# Arguments to pass to the busted command when LUA_USE_BUSTED.
#
# === Defined variables ===
#
@@ -90,11 +93,15 @@ BUILDLINK_TRANSFORM+= rm:-std=c89
BUILDLINK_TRANSFORM+= rm:-std=c90
.endif
+LUA_USE_BUSTED?= no
+
.if !empty(LUA_USE_BUSTED:M[yY][eE][sS])
TEST_DEPENDS+= ${LUA_PKGPREFIX}-busted-[0-9]*:../../devel/lua-busted
do-test:
- cd ${WRKSRC} && ${PREFIX}/bin/busted${_LUA_DOT_VERSION}
+ cd ${WRKSRC} && ${TEST_ENV} \
+ ${PREFIX}/bin/busted${_LUA_DOT_VERSION} \
+ ${LUA_BUSTED_ARGS}
.endif # LUA_USE_BUSTED
.endif # LUA_MODULE_MK