Skip Menu |

This queue is for tickets about the ExtUtils-MakeMaker-Coverage CPAN distribution.

Report information
The Basics
Id: 11751
Status: open
Priority: 0/
Queue: ExtUtils-MakeMaker-Coverage

People
Owner: SMPETERS [...] cpan.org
Requestors: grousse [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



The created target incoditionnaly tries to run test files referenced by $(TEST_FILES) makefile variable, whereas this variable only references files under a t/ directory. The following patch ensure standard default behaviour for test target, allowing the use of single test test.pl file.
--- Coverage.pm~ 2005-03-04 17:31:14.688188178 +0100 +++ Coverage.pm 2005-03-04 17:30:38.126730342 +0100 @@ -110,16 +110,34 @@ =cut sub testcover { - return <<'END'; + my($self, %attribs) = @_; + + my $tests = $attribs{TESTS} || ''; + if (!$tests && -d 't') { + $tests = $self->find_tests; + } + + my $m = <<'END'; COVER = cover coverclean: $(COVER) -delete testcover: coverclean +END + + $m .= <<'END' if $tests; HARNESS_PERL_SWITCHES=-MDevel::Cover PERL_DL_NONLAZY=1 $(FULLPERLRUN) "-MExtUtils::Command::MM" "-e" "test_harness($(TEST_VERBOSE), '$(INST_LIB)', '$(INST_ARCHLIB)')" $(TEST_FILES) +END + + $m .= <<'END' if -f "test.pl"; + HARNESS_PERL_SWITCHES=-MDevel::Cover PERL_DL_NONLAZY=1 $(FULLPERLRUN) "-MExtUtils::Command::MM" "-e" "test_harness($(TEST_VERBOSE), '$(INST_LIB)', '$(INST_ARCHLIB)')" $(TEST_FILE) +END + $m .= <<'END'; $(COVER) END + + return $m; } sub import {