david2008 has asked for the wisdom of the Perl Monks concerning the following question:
I have a directory with many subdirectories(more than one level) and want to have one devel::cover run on all these files.
I tried to write the program run_tests.pl
but when runninguse strict; use warnings; use File::Find; use TAP::Harness; my ($base_dir) = @ARGV; my @tests; find(\&wanted, $base_dir); my $harness = TAP::Harness->new(); $harness->runtests(@tests); sub wanted { if($File::Find::name !~ /\.t$/) { return; } push @tests, "$File::Find::name"; }
---------------------------- ------ ------ ------ ------ ------ ------ ------
File stmt bran cond sub pod time total
---------------------------- ------ ------ ------ ------ ------ ------ ------
t/run_tests.pl 100.0 100.0 n/a 100.0 n/a 100.0 100.0
Total 100.0 100.0 n/a 100.0 n/a 100.0 100.0
---------------------------- ------ ------ ------ ------ ------ ------ ------
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Running devel::cover recursively on directory with .t files
by Corion (Patriarch) on Jun 02, 2013 at 09:21 UTC | |
by david2008 (Scribe) on Jun 02, 2013 at 11:20 UTC |