diff --git a/devel/Makefile b/devel/Makefile index 65a2517d1050..783bef048bfd 100644 --- a/devel/Makefile +++ b/devel/Makefile @@ -3270,6 +3270,7 @@ SUBDIR += p5-Test-More-UTF8 SUBDIR += p5-Test-Most SUBDIR += p5-Test-Name-FromLine + SUBDIR += p5-Test-Needs SUBDIR += p5-Test-Net-LDAP SUBDIR += p5-Test-Net-RabbitMQ SUBDIR += p5-Test-NoTabs diff --git a/devel/p5-Test-Needs/Makefile b/devel/p5-Test-Needs/Makefile new file mode 100644 index 000000000000..5f60b3155d02 --- /dev/null +++ b/devel/p5-Test-Needs/Makefile @@ -0,0 +1,20 @@ +# Created by: Sunpoet Po-Chuan Hsieh +# $FreeBSD$ + +PORTNAME= Test-Needs +PORTVERSION= 0.002002 +CATEGORIES= devel perl5 +MASTER_SITES= CPAN +PKGNAMEPREFIX= p5- + +MAINTAINER= sunpoet@FreeBSD.org +COMMENT= Skip tests when modules not available + +LICENSE= ART10 GPLv1 +LICENSE_COMB= dual + +NO_ARCH= yes +USES= perl5 +USE_PERL5= configure + +.include diff --git a/devel/p5-Test-Needs/distinfo b/devel/p5-Test-Needs/distinfo new file mode 100644 index 000000000000..8e9d7d703d05 --- /dev/null +++ b/devel/p5-Test-Needs/distinfo @@ -0,0 +1,3 @@ +TIMESTAMP = 1466899878 +SHA256 (Test-Needs-0.002002.tar.gz) = 97e9827e1b14a61151509a229b153010811831437fa24db49ea76f73bed05e05 +SIZE (Test-Needs-0.002002.tar.gz) = 8106 diff --git a/devel/p5-Test-Needs/pkg-descr b/devel/p5-Test-Needs/pkg-descr new file mode 100644 index 000000000000..c9449b8d3f50 --- /dev/null +++ b/devel/p5-Test-Needs/pkg-descr @@ -0,0 +1,23 @@ +Skip test scripts if modules are not available. The requested modules will be +loaded, and optionally have their versions checked. If the module is missing, +the test script will be skipped. Modules that are found but fail to compile will +exit with an error rather than skip. + +If used in a subtest, the remainder of the subtest will be skipped. + +Skipping will work even if some tests have already been run, or if a plan has +been declared. + +Versions are checked via a $module->VERSION($wanted_version) call. Versions must +be provided in a format that will be accepted. No extra processing is done on +them. + +If perl is used as a module, the version is checked against the running perl +version ($]). The version can be specified as a number, dotted-decimal string, +v-string, or version object. + +If the RELEASE_TESTING environment variable is set, the tests will fail rather +than skip. Subtests will be aborted, but the test script will continue running +after that point. + +WWW: http://search.cpan.org/dist/Test-Needs/ diff --git a/devel/p5-Test-Needs/pkg-plist b/devel/p5-Test-Needs/pkg-plist new file mode 100644 index 000000000000..bbe7e4f42ba7 --- /dev/null +++ b/devel/p5-Test-Needs/pkg-plist @@ -0,0 +1,2 @@ +%%SITE_PERL%%/Test/Needs.pm +%%PERL5_MAN3%%/Test::Needs.3.gz