Skip Menu |
 

This queue is for tickets about the Module-Build CPAN distribution.

Report information
The Basics
Id: 23584
Status: resolved
Priority: 0/
Queue: Module-Build

People
Owner: Nobody in particular
Requestors: chris+rt [...] chrisdolan.net
Cc:
AdminCc:

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



Subject: testcover action doesn't clear cover_db if .t files change
Download (untitled) / with headers
text/plain 174b
Running "./Build testcover" is supposed to delete the cover_db directory if any files have changed. M::B does that successfully for changed .pm files, but not for .t files.
Download (untitled) / with headers
text/plain 614b
Thanks, I think the following patch fixes it. Any way to test it conveniently? -Ken ============================== --- lib/Module/Build/Base.pm (revision 2021) +++ lib/Module/Build/Base.pm (local) @@ -2111,7 +2111,8 @@ my $cover_files = $self->rscan_dir('cover_db', sub {-f $_ and not /\.html$/}); $self->do_system(qw(cover -delete)) - unless $self->up_to_date($pm_files, $cover_files); + unless $self->up_to_date($pm_files, $cover_files) + && $self->up_to_date($self->test_files, $cover_files); } local $Test::Harness::switches = ==============================
Download (untitled) / with headers
text/plain 605b
On Sun Nov 26 23:49:38 2006, KWILLIAMS wrote: Show quoted text
> Thanks, I think the following patch fixes it. Any way to test it > conveniently?
Ken, Thanks! I've confirmed that this patch works for me. This is a good 99% solution. However, I work on some projects that have data files in which affect the coverage report. A solution that would make me very happy would be if cover_db were deleted if any files listed in MANIFEST changed since the last testcover. Honestly, I often just do the following since it's rare that the cover_db should be preserved: /bin/rm -rf cover_db; ./Build testcover -- Chris
Download (untitled) / with headers
text/plain 305b
I've committed the previous patch. When I run the testcover action it's usually pretty slow, it would sort of be a drag to delete everything just because Changes or README has been modified. Then again, that's not likely to happen very often. I dunno, you could convince me either way pretty easily.
Download (untitled) / with headers
text/plain 552b
On Mon Nov 27 21:57:15 2006, KWILLIAMS wrote: Show quoted text
> I've committed the previous patch. When I run the testcover action > it's usually pretty slow, it > would sort of be a drag to delete everything just because Changes or > README has been > modified. Then again, that's not likely to happen very often. I > dunno, you could convince me > either way pretty easily.
Like I said, your patch is a 99% solution (thanks!), so I say close this bug as resolved. My case may be turn out to be rare, so I'll just stick to manually deleting cover_db. -- Chris
sounds resolved... thanks


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.