Browse files

Start of gcov support.

  • Loading branch information...
1 parent 6e3a5a3 commit 14838f5abcbbbeffa43586ab38670fea7e061ce8 @pjcj committed Sep 20, 2005
Showing with 8 additions and 2 deletions.
  1. +8 −2 cover
View
10 cover
@@ -56,6 +56,7 @@ sub get_options
delete!
delete_uncoverable_point=s
dump_db!
+ gcov!
help|h!
ignore_re=s
ignore=s
@@ -156,9 +157,14 @@ sub main
{
delete_db($dbname, @ARGV);
local $ENV{ -d "t" ? "HARNESS_PERL_SWITCHES" : "PERL5OPT" } =
- # "-Mblib=$Bin -MDevel::Cover";
"-MDevel::Cover";
- system "make test";
+ my $test = "make test";
+ if ($Options->{gcov})
+ {
+ my $o = "-fprofile-arcs\\ -ftest-coverage";
+ $test .= " CCFLAGS=-O0\\ $o OTHERLDFLAGS=$o";
+ }
+ system $test;
$Options->{report} ||= "html";
}

0 comments on commit 14838f5

Please sign in to comment.