pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/lang/lua lua: Add support for running tests with buste...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/622494956e94
branches:  trunk
changeset: 374332:622494956e94
user:      nia <nia%pkgsrc.org@localhost>
date:      Sat Feb 19 20:39:58 2022 +0000

description:
lua: Add support for running tests with busted to module.mk

diffstat:

 lang/lua/module.mk |  17 +++++++++++++++--
 1 files changed, 15 insertions(+), 2 deletions(-)

diffs (35 lines):

diff -r eb871e002a43 -r 622494956e94 lang/lua/module.mk
--- a/lang/lua/module.mk        Sat Feb 19 18:49:17 2022 +0000
+++ b/lang/lua/module.mk        Sat Feb 19 20:39:58 2022 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: module.mk,v 1.12 2021/12/06 18:54:32 nia Exp $
+# $NetBSD: module.mk,v 1.13 2022/02/19 20:39:58 nia Exp $
 #
 # This Makefile fragment is intended to be included by packages that
 # install Lua modules.
@@ -15,6 +15,12 @@
 #      Possible values: yes no
 #      Default: yes
 #
+# LUA_USE_BUSTED
+#      Use busted to run tests and provide a do-test target.
+#
+#      Possible values: yes no
+#      Default: yes
+#
 # === Defined variables ===
 #
 # LUA_LDIR
@@ -84,4 +90,11 @@
 BUILDLINK_TRANSFORM+=  rm:-std=c90
 .endif
 
-.endif  # LUA_MODULE_MK
+.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}
+.endif # LUA_USE_BUSTED
+
+.endif # LUA_MODULE_MK



Home | Main Index | Thread Index | Old Index