Skip to content

Commit

Permalink
devel/p5-Test2-Plugin-Cover: Add p5-Test2-Plugin-Cover 0.000022
Browse files Browse the repository at this point in the history
Test2::Plugin::Cover will collect minimal file coverage info, and will do so
with minimal performance impact.

Every time a subroutine is called this tool will do its best to find the
filename the subroutine was defined in, and add it to a list. Also, anytime you
attempt to open a file with open() or sysopen() the file will be added to the
list. This list will be attached to a test2 event just before the test exits. In
most formaters the event will only show up as a comment on STDOUT # This test
covered N source files. . However tools such as Test2::Harness::UI can make full
use of the coverage information contained in the event.

WWW: https://metacpan.org/release/Test2-Plugin-Cover
  • Loading branch information
sunpoet committed May 1, 2021
1 parent 3da9271 commit a5a2e1e
Show file tree
Hide file tree
Showing 5 changed files with 54 additions and 0 deletions.
1 change: 1 addition & 0 deletions devel/Makefile
Expand Up @@ -3499,6 +3499,7 @@
SUBDIR += p5-Test-YAML-Valid
SUBDIR += p5-Test-utf8
SUBDIR += p5-Test2-Harness
SUBDIR += p5-Test2-Plugin-Cover
SUBDIR += p5-Test2-Plugin-DBIProfile
SUBDIR += p5-Test2-Plugin-IOEvents
SUBDIR += p5-Test2-Plugin-MemUsage
Expand Down
33 changes: 33 additions & 0 deletions devel/p5-Test2-Plugin-Cover/Makefile
@@ -0,0 +1,33 @@
# Created by: Po-Chuan Hsieh <sunpoet@FreeBSD.org>

PORTNAME= Test2-Plugin-Cover
PORTVERSION= 0.000022
CATEGORIES= devel perl5
MASTER_SITES= CPAN
MASTER_SITE_SUBDIR= CPAN:EXODIST
PKGNAMEPREFIX= p5-

MAINTAINER= sunpoet@FreeBSD.org
COMMENT= Fast and Minimal file coverage info

LICENSE= ART10 GPLv1+
LICENSE_COMB= dual
LICENSE_FILE= ${WRKSRC}/LICENSE

BUILD_DEPENDS= ${RUN_DEPENDS}
RUN_DEPENDS= p5-Path-Tiny>=0.048:devel/p5-Path-Tiny
TEST_DEPENDS= p5-Test2-Suite>=0.000130:devel/p5-Test2-Suite

USES= perl5
USE_PERL5= configure

.include <bsd.port.pre.mk>

.if ${PERL_LEVEL} < 503200
RUN_DEPENDS+= p5-Test-Simple>=1.302166:devel/p5-Test-Simple
.endif

post-install:
${STRIP_CMD} ${STAGEDIR}${PREFIX}/${SITE_ARCH_REL}/auto/Test2/Plugin/Cover/Cover.so

.include <bsd.port.post.mk>
3 changes: 3 additions & 0 deletions devel/p5-Test2-Plugin-Cover/distinfo
@@ -0,0 +1,3 @@
TIMESTAMP = 1619725307
SHA256 (Test2-Plugin-Cover-0.000022.tar.gz) = b7fd5f9b751242b1bf2a2bb4f2718ca344edf596e45b0b0b4b546dac155c8c02
SIZE (Test2-Plugin-Cover-0.000022.tar.gz) = 30031
12 changes: 12 additions & 0 deletions devel/p5-Test2-Plugin-Cover/pkg-descr
@@ -0,0 +1,12 @@
Test2::Plugin::Cover will collect minimal file coverage info, and will do so
with minimal performance impact.

Every time a subroutine is called this tool will do its best to find the
filename the subroutine was defined in, and add it to a list. Also, anytime you
attempt to open a file with open() or sysopen() the file will be added to the
list. This list will be attached to a test2 event just before the test exits. In
most formaters the event will only show up as a comment on STDOUT # This test
covered N source files. . However tools such as Test2::Harness::UI can make full
use of the coverage information contained in the event.

WWW: https://metacpan.org/release/Test2-Plugin-Cover
5 changes: 5 additions & 0 deletions devel/p5-Test2-Plugin-Cover/pkg-plist
@@ -0,0 +1,5 @@
%%SITE_ARCH%%/Test2/EventFacet/Coverage.pm
%%SITE_ARCH%%/Test2/Plugin/Cover.pm
%%SITE_ARCH%%/auto/Test2/Plugin/Cover/Cover.so
%%PERL5_MAN3%%/Test2::EventFacet::Coverage.3.gz
%%PERL5_MAN3%%/Test2::Plugin::Cover.3.gz

0 comments on commit a5a2e1e

Please sign in to comment.