X-Git-Url: http://git.vpit.fr/?a=blobdiff_plain;f=lib%2FTest%2FValgrind.pm;h=1df876c3d10fb8f91d8d28d75e21a84ba5fe37a5;hb=d77165d74a0a4d3a18143cd63cdb624252058698;hp=4669b23bd7bcdeae65ebeb8ca879e82b56c0330a;hpb=a08a925178ff4a5e8a68dc9ecc21d50c67049939;p=perl%2Fmodules%2FTest-Valgrind.git diff --git a/lib/Test/Valgrind.pm b/lib/Test/Valgrind.pm index 4669b23..1df876c 100644 --- a/lib/Test/Valgrind.pm +++ b/lib/Test/Valgrind.pm @@ -9,11 +9,11 @@ Test::Valgrind - Generate suppressions, analyse and test any command with valgri =head1 VERSION -Version 1.15 +Version 1.18 =cut -our $VERSION = '1.15'; +our $VERSION = '1.18'; =head1 SYNOPSIS @@ -96,7 +96,7 @@ C<< callers => $number >> Specify the maximum stack depth studied when valgrind encounters an error. Raising this number improves granularity. -Ignored if you supply your own custom C, otherwise defaults to C<50>. +Ignored if you supply your own custom C, otherwise defaults to C<24> (the maximum allowed by C). =item * @@ -124,6 +124,14 @@ Defaults to false. =item * +C<< allow_no_supp => $bool >> + +If true, force running the analysis even if the suppression files do not refer to any C-related symbol. + +Defaults to false. + +=item * + C<< extra_supps => \@files >> Also use suppressions from C<@files> besides C's. @@ -201,12 +209,14 @@ sub analyse { my $tool = delete $args{tool}; unless ($tool->$instanceof('Test::Valgrind::Tool')) { + my $callers = delete $args{callers} || 24; + $callers = 24 if $callers <= 0; require Test::Valgrind::Tool; local $@; $tool = eval { Test::Valgrind::Tool->new( - tool => $tool || 'memcheck', - callers => delete $args{callers}, + tool => $tool || 'memcheck', + callers => $callers, ); }; unless ($tool) { @@ -220,7 +230,12 @@ sub analyse { my $sess = eval { Test::Valgrind::Session->new( min_version => $tool->requires_version, - map { $_ => delete $args{$_} } qw + map { $_ => delete $args{$_} } qw< + regen_def_supp + no_def_supp + allow_no_supp + extra_supps + > ); }; unless ($sess) { @@ -423,7 +438,7 @@ What your tests output to C and C is eaten unless you pass the C =head1 DEPENDENCIES -L, L, L, L, L. +L, L, L, L. =head1 SEE ALSO