X-Git-Url: http://git.vpit.fr/?a=blobdiff_plain;f=lib%2FTest%2FValgrind.pm;h=0ca131a922bad6f8b4047a035dc73fe3689bafbf;hb=195f0244c01e942307e13d693f196156b9263444;hp=1b4aa78a287fbdf4ebc3d2252f8967cb6bceb5a5;hpb=7ad8fbc2cc5dd369b54e5b9927b85c74e142ee6a;p=perl%2Fmodules%2FTest-Valgrind.git diff --git a/lib/Test/Valgrind.pm b/lib/Test/Valgrind.pm index 1b4aa78..0ca131a 100644 --- a/lib/Test/Valgrind.pm +++ b/lib/Test/Valgrind.pm @@ -5,15 +5,15 @@ use warnings; =head1 NAME -Test::Valgrind - Test Perl code through valgrind. +Test::Valgrind - Generate suppressions, analyse and test any command with valgrind. =head1 VERSION -Version 1.01 +Version 1.11 =cut -our $VERSION = '1.01'; +our $VERSION = '1.11'; =head1 SYNOPSIS @@ -38,6 +38,9 @@ This module is a front-end to the C API that lets you run Per If they aren't available yet, it will first generate suppressions for the current C interpreter and store them in the portable flavour of F<~/.perl/Test-Valgrind/suppressions/$VERSION>. The actual run will then take place, and tests will be passed or failed according to the result of the analysis. +The complete API is much more versatile than this. +It allows you to run I executable under valgrind, generate the corresponding suppressions and convert the analysis output to TAP so that it can be incorporated into your project's testsuite. + Due to the nature of perl's memory allocator, this module can't track leaks of Perl objects. This includes non-mortalized scalars and memory cycles. However, it can track leaks of chunks of memory allocated in XS extensions with C and friends or C. As such, it's complementary to the other very good leak detectors listed in the L section. @@ -165,7 +168,9 @@ sub analyse { ); }; unless ($sess) { - $action->abort($sess, $@); + my $err = $@; + $err =~ s/^(Empty valgrind candidates list|No appropriate valgrind executable could be found)\s+at.*/$1/; + $action->abort($sess, $err); return $action->status($sess); } @@ -303,14 +308,14 @@ What your tests output to C and C is eaten unless you pass the C =head1 DEPENDENCIES -Valgrind 3.1.0 (L). - L, L, L, L, L. =head1 SEE ALSO All the C API, including L, L, L and L. +The C man page. + L. L, L, L.