my @tests;
my $verbose;
my $nodc;
+my $make_opts = "";
GetOptions("t|test=s" => \@tests,
+ "m=s" => \$make_opts,
"n" => \$nodc,
"v" => \$verbose)
or die;
}
run("cover -delete");
run("perl Makefile.PL --coverage @ARGV")
- and die;
-run("$make 'OTHERLDFLAGS=-ftest-coverage -fprofile-arcs'")
- and die;
+ and die "Makefile.PL failed\n";
+run("$make $make_opts 'OTHERLDFLAGS=-ftest-coverage -fprofile-arcs'")
+ and die "build failed\n";
{
local $ENV{DEVEL_COVER_OPTIONS} = "-db," . getcwd() . "/cover_db,-coverage,statement,branch,condition,subroutine";
if (@tests) {
$makecmd .= " TEST_FILES='@tests'";
}
- run($makecmd);
+ run($makecmd)
+ and die "Test failed\n";
}
# build gcov files