]> git.vpit.fr Git - perl/modules/Test-Valgrind.git/blobdiff - gen.pl
Output what we got when t/30-bad.t fails
[perl/modules/Test-Valgrind.git] / gen.pl
diff --git a/gen.pl b/gen.pl
index ff82e873813d9f3d8cbcf11bae6a0288a414a587..eb751e417ff9f62136cd0fa0ef99112e685edb2b 100755 (executable)
--- a/gen.pl
+++ b/gen.pl
@@ -1,20 +1,30 @@
-#!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 $@;
+ }
+ plan tests => 1;
+ fail('fake');
+}
 
 1;
-