]> git.vpit.fr Git - perl/modules/Test-Valgrind.git/blob - gen.pl
Generate suppressions with eval BLOCK, and test it too
[perl/modules/Test-Valgrind.git] / gen.pl
1 #!perl
2
3 use strict;
4 use warnings;
5
6 use Test::More;
7 eval {
8  use Test::Valgrind
9   diag    => 1,
10   no_test => 1,
11   no_supp => 1,
12   callers => 50,
13   extra   => [ qw/--show-reachable=yes --gen-suppressions=all/ ];
14 };
15 if ($@) {
16  plan skip_all => 'Test::Valgrind is required to run test your distribution with valgrind';
17 } else {
18  eval {
19   require XSLoader;
20   XSLoader::load('Test::Valgrind', $Test::Valgrind::VERSION);
21  };
22  unless ($@) {
23   Test::Valgrind::notleak("valgrind it!");
24  }
25 }
26
27 1;