Source-Changes-HG archive

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

[pkgsrc/trunk]: pkgsrc/devel devel: Add lua-cov



details:   https://anonhg.NetBSD.org/pkgsrc/rev/b4681c30b637
branches:  trunk
changeset: 435611:b4681c30b637
user:      nia <nia%pkgsrc.org@localhost>
date:      Fri Jul 10 10:26:59 2020 +0000

description:
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.

diffstat:

 devel/Makefile         |   3 ++-
 devel/lua-cov/DESCR    |   6 ++++++
 devel/lua-cov/Makefile |  45 +++++++++++++++++++++++++++++++++++++++++++++
 devel/lua-cov/PLIST    |  26 ++++++++++++++++++++++++++
 devel/lua-cov/distinfo |   6 ++++++
 5 files changed, 85 insertions(+), 1 deletions(-)

diffs (116 lines):

diff -r c3eae6ac7377 -r b4681c30b637 devel/Makefile
--- a/devel/Makefile    Fri Jul 10 10:25:08 2020 +0000
+++ b/devel/Makefile    Fri Jul 10 10:26:59 2020 +0000
@@ -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
diff -r c3eae6ac7377 -r b4681c30b637 devel/lua-cov/DESCR
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/devel/lua-cov/DESCR       Fri Jul 10 10:26:59 2020 +0000
@@ -0,0 +1,6 @@
+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.
diff -r c3eae6ac7377 -r b4681c30b637 devel/lua-cov/Makefile
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/devel/lua-cov/Makefile    Fri Jul 10 10:26:59 2020 +0000
@@ -0,0 +1,45 @@
+# $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@localhost
+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"
diff -r c3eae6ac7377 -r b4681c30b637 devel/lua-cov/PLIST
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/devel/lua-cov/PLIST       Fri Jul 10 10:26:59 2020 +0000
@@ -0,0 +1,26 @@
+@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
diff -r c3eae6ac7377 -r b4681c30b637 devel/lua-cov/distinfo
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/devel/lua-cov/distinfo    Fri Jul 10 10:26:59 2020 +0000
@@ -0,0 +1,6 @@
+$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



Home | Main Index | Thread Index | Old Index