X-Git-Url: http://git.vpit.fr/?a=blobdiff_plain;f=gen.pl;h=9376b5c39f05d69fc084254ee32c3a4006d94c40;hb=66686a5cd7b12c4d529afd82273bd81cacf1ee6d;hp=ff82e873813d9f3d8cbcf11bae6a0288a414a587;hpb=41a4b907f4846f2d35b170f517fb83ceb13f298c;p=perl%2Fmodules%2FTest-Valgrind.git diff --git a/gen.pl b/gen.pl index ff82e87..9376b5c 100755 --- a/gen.pl +++ b/gen.pl @@ -1,20 +1,28 @@ -#!perl - use strict; use warnings; use Test::More; -eval <<'EOD'; -use Test::Valgrind diag => 1, - no_test => 1, - no_supp => 1, - extra => [ - q{--show-reachable=yes}, - q{--gen-suppressions=all}, -# q{--log-fd=1} - ] -EOD -plan skip_all => 'Test::Valgrind is required to run test your distribution with valgrind' if $@; +eval { + use Test::Valgrind + diag => 1, + no_test => 1, + no_supp => 1, + callers => 50, + extra => [ qw/--show-reachable=yes --gen-suppressions=all/ ]; +}; +if ($@) { + plan skip_all => 'Test::Valgrind is required to run test your distribution with valgrind'; +} else { + eval " + use lib qw{blib/arch}; + require XSLoader; + XSLoader::load('Test::Valgrind', \$Test::Valgrind::VERSION); + "; + unless ($@) { + Test::Valgrind::notleak("valgrind it!"); + } else { + diag $@; + } +} 1; -