Permalink
Browse files

More DEVEL_COVER_NO_TESTS changes for p5cover.

  • Loading branch information...
1 parent dbf38dd commit d7d2a12dfbb5720b7d9d71d4ce1bf6b57296a26b @pjcj committed Jul 17, 2013
Showing with 21 additions and 10 deletions.
  1. +1 −0 Changes
  2. +20 −10 Makefile.PL
View
1 Changes
@@ -1,6 +1,7 @@
Devel::Cover history
{{$NEXT}}
+ - More DEVEL_COVER_NO_TESTS changes for p5cover.
Release 1.05 - 17 July 2013
- Quieten some deparse warnings.
View
30 Makefile.PL
@@ -136,6 +136,14 @@ closedir D or die "Cannot closedir tests: $!";
s/^/tests\// for @tests;
push @tests, grep !/e2e/, glob "t/*/*.t";
+if ($ENV{DEVEL_COVER_NO_TESTS})
+{
+ # don't run tests under p5cover
+ print "removing all tests with DEVEL_COVER_NO_TESTS\n";
+ system "rm -rf t/*"; # TODO portability
+ @tests = ();
+}
+
print "done\n\n";
my %checked;
@@ -313,8 +321,7 @@ print "\n" x 3;
$ExtUtils::MakeMaker::Verbose = 0;
-WriteMakefile
-(
+my $opts = {
NAME => "Devel::Cover",
VERSION => $Version,
AUTHOR => 'Paul Johnson <paul@pjcj.net>',
@@ -325,27 +332,30 @@ WriteMakefile
PREREQ_PM => {
Storable => 0,
"Digest::MD5" => 0,
- "Test::More" => 0,
- "Test::Warn" => 0,
+ $ENV{DEVEL_COVER_NO_TESTS}
+ ? ()
+ : ( "Test::More" => 0, "Test::Warn" => 0 )
},
TYPEMAPS => [ "utils/typemap" ],
clean => {
FILES => "t/e2e/* cover_db* t/e2e/*cover_db " .
"README *.gcov *.out"
},
- dist => { COMPRESS => "gzip --best --force" },
+ dist => { COMPRESS => "gzip --best --force" },
test => {
- TESTS => $ENV{DEVEL_COVER_NO_TESTS}
- ? ""
- : "t/*/*.t"
+ TESTS => $ENV{DEVEL_COVER_NO_TESTS}
+ ? ""
+ : "t/*/*.t"
},
realclean => $] < 5.008008 ?
{
- FILES => "lib/Devel/Cover/Inc.pm",
+ FILES => "lib/Devel/Cover/Inc.pm",
POSTOP => "\$(RM_RF) cover_db t/e2e"
} :
{ FILES => "lib/Devel/Cover/Inc.pm cover_db t/e2e" },
-);
+};
+# use Data::Dumper; print Dumper $opts;
+WriteMakefile(%$opts);
print "\n";
print <<EOM if 0;

0 comments on commit d7d2a12

Please sign in to comment.