Fri Jul 10 10:26:59 2020 UTC ()
devel: Add lua-cov

LuaCov is a simple coverage analyzer for Lua scripts. When a Lua script is
run with the luacov module loaded, it generates a stats file with the number
of executions of each line of the script and its loaded modules. The luacov
command-line script then processes this file generating a report file which
allows one to visualize which code paths were not traversed, which is useful
for verifying the effectiveness of a test suite.


(nia)
diff -r1.3168 -r1.3169 pkgsrc/devel/Makefile
diff -r0 -r1.1 pkgsrc/devel/lua-cov/DESCR
diff -r0 -r1.1 pkgsrc/devel/lua-cov/Makefile
diff -r0 -r1.1 pkgsrc/devel/lua-cov/PLIST
diff -r0 -r1.1 pkgsrc/devel/lua-cov/distinfo

cvs diff -r1.3168 -r1.3169 pkgsrc/devel/Makefile (expand / switch to context diff)
--- pkgsrc/devel/Makefile 2020/07/09 13:34:02 1.3168
+++ pkgsrc/devel/Makefile 2020/07/10 10:26:59 1.3169
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.3168 2020/07/09 13:34:02 nia Exp $
+# $NetBSD: Makefile,v 1.3169 2020/07/10 10:26:59 nia Exp $
 #
 
 COMMENT=	Development utilities
@@ -855,6 +855,7 @@
 SUBDIR+=	lua-busted
 SUBDIR+=	lua-cliargs
 SUBDIR+=	lua-compat53
+SUBDIR+=	lua-cov
 SUBDIR+=	lua-coxpcall
 SUBDIR+=	lua-cqueues
 SUBDIR+=	lua-fifo

File Added: pkgsrc/devel/lua-cov/DESCR
LuaCov is a simple coverage analyzer for Lua scripts. When a Lua script is
run with the luacov module loaded, it generates a stats file with the number
of executions of each line of the script and its loaded modules. The luacov
command-line script then processes this file generating a report file which
allows one to visualize which code paths were not traversed, which is useful
for verifying the effectiveness of a test suite.

File Added: pkgsrc/devel/lua-cov/Makefile
# $NetBSD: Makefile,v 1.1 2020/07/10 10:26:59 nia Exp $

DISTNAME=	luacov-0.14.0
PKGNAME=	${LUA_PKGPREFIX}-${DISTNAME:S/^lua//1}
CATEGORIES=	lua devel
MASTER_SITES=	${MASTER_SITE_GITHUB:=keplerproject/}
GITHUB_PROJECT=	luacov
GITHUB_TAG=	v${PKGVERSION_NOREV}

MAINTAINER=	pkgsrc-users@NetBSD.org
HOMEPAGE=	https://keplerproject.github.io/luacov/
COMMENT=	Simple coverage analyzer for Lua scripts
LICENSE=	mit

NO_BUILD=	yes
USE_LANGUAGES=	# none

PLIST_SUBST+=	LUADOTVER=${_LUA_DOT_VERSION}

REPLACE_LUA+=	src/bin/luacov

INSTALLATION_DIRS+=	bin
INSTALLATION_DIRS+=	${LUA_LDIR}/luacov
INSTALLATION_DIRS+=	${LUA_LDIR}/luacov/reporter
INSTALLATION_DIRS+=	${LUA_DOCDIR}/doc/modules

do-install:
	${INSTALL_SCRIPT} ${WRKSRC}/src/bin/luacov \
		${DESTDIR}${PREFIX}/bin/luacov${_LUA_DOT_VERSION}
	${INSTALL_DATA} ${WRKSRC}/src/luacov.lua \
		${DESTDIR}${PREFIX}/${LUA_LDIR}
	${INSTALL_DATA} ${WRKSRC}/src/luacov/*.lua \
		${DESTDIR}${PREFIX}/${LUA_LDIR}/luacov
	${INSTALL_DATA} ${WRKSRC}/src/luacov/reporter/*.lua \
		${DESTDIR}${PREFIX}/${LUA_LDIR}/luacov/reporter
	cd ${WRKSRC}/doc && ${INSTALL_DATA} *.html *.css *.png \
		${DESTDIR}${PREFIX}/${LUA_DOCDIR}
	cd ${WRKSRC}/doc/doc && ${INSTALL_DATA} *.html *.css \
		${DESTDIR}${PREFIX}/${LUA_DOCDIR}/doc
	cd ${WRKSRC}/doc/doc/modules && ${INSTALL_DATA} *.html \
		${DESTDIR}${PREFIX}/${LUA_DOCDIR}/doc/modules

.include "../../lang/lua/application.mk"
.include "../../lang/lua/module.mk"
.include "../../mk/bsd.pkg.mk"

File Added: pkgsrc/devel/lua-cov/PLIST
@comment $NetBSD: PLIST,v 1.1 2020/07/10 10:26:59 nia Exp $
bin/luacov${LUADOTVER}
${LUA_DOCDIR}/doc.css
${LUA_DOCDIR}/doc/index.html
${LUA_DOCDIR}/doc/ldoc.css
${LUA_DOCDIR}/doc/modules/luacov.defaults.html
${LUA_DOCDIR}/doc/modules/luacov.hook.html
${LUA_DOCDIR}/doc/modules/luacov.html
${LUA_DOCDIR}/doc/modules/luacov.reporter.html
${LUA_DOCDIR}/doc/modules/luacov.runner.html
${LUA_DOCDIR}/doc/modules/luacov.stats.html
${LUA_DOCDIR}/doc/modules/luacov.tick.html
${LUA_DOCDIR}/doc/modules/luacov.util.html
${LUA_DOCDIR}/index.html
${LUA_DOCDIR}/license.html
${LUA_DOCDIR}/luacov.png
${LUA_LDIR}/luacov.lua
${LUA_LDIR}/luacov/defaults.lua
${LUA_LDIR}/luacov/hook.lua
${LUA_LDIR}/luacov/linescanner.lua
${LUA_LDIR}/luacov/reporter.lua
${LUA_LDIR}/luacov/reporter/default.lua
${LUA_LDIR}/luacov/runner.lua
${LUA_LDIR}/luacov/stats.lua
${LUA_LDIR}/luacov/tick.lua
${LUA_LDIR}/luacov/util.lua

File Added: pkgsrc/devel/lua-cov/distinfo
$NetBSD: distinfo,v 1.1 2020/07/10 10:26:59 nia Exp $

SHA1 (luacov-0.14.0.tar.gz) = d10c25af154b6d6b19197fcccdc48fa5362ea1a5
RMD160 (luacov-0.14.0.tar.gz) = eab58848f391fb78202816f2897ba2c7a801ef62
SHA512 (luacov-0.14.0.tar.gz) = 44ea158ce597f705d80b9768676e401804daea91b9c2afb146a8d25aae612e895e4f42a29c4b7b3438659c596fa500af5d23b66b7f3477459747ad06ca9b7ffa
Size (luacov-0.14.0.tar.gz) = 49571 bytes