Skip to content

Commit

Permalink
try to generate all coverage into the one cover_db
Browse files Browse the repository at this point in the history
  • Loading branch information
tonycoz committed Apr 4, 2011
1 parent c1d16c8 commit 86c50c4
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions imcover.perl
Expand Up @@ -2,6 +2,7 @@
use strict;
use Config;
use ExtUtils::Manifest 'maniread';
use Cwd;

my $make = $Config{make};
# if there's a way to make with profiling for a recursive build like
Expand All @@ -15,7 +16,10 @@
system "$make 'OTHERLDFLAGS=-ftest-coverage -fprofile-arcs'"
and die;

system "$make test HARNESS_PERL_SWITCHES=-MDevel::Cover";
{
local $ENV{DEVEL_COVER_OPTIONS} = "-db," . getcwd() . "/cover_db";
system "$make test TEST_VERBOSE=1 HARNESS_PERL_SWITCHES=-MDevel::Cover";
}

# build gcov files
my $mani = maniread();
Expand Down Expand Up @@ -45,5 +49,5 @@
}

my @dbs = "cover_db", map "$_/cover_db", grep $_, keys %paths;
system "cover @dbs";
system "cover -ignore_re '^t/'";

0 comments on commit 86c50c4

Please sign in to comment.