| 25 | | unless( $ENV{TEST_VALGRIND} ) { |
|---|
| 26 | | plan tests => 1; |
|---|
| 27 | | ok( 1, "skipping, TEST_VALGRIND not set" ); |
|---|
| 28 | | exit(0); |
|---|
| 29 | | } |
|---|
| 30 | | my $valgrind = mywhich( "valgrind" ); |
|---|
| 31 | | unless( $valgrind ) { |
|---|
| 32 | | plan tests => 1; |
|---|
| 33 | | ok( 1, "skipping, valgrind not found" ); |
|---|
| 34 | | exit(0); |
|---|
| 35 | | } |
|---|
| 36 | | plan tests => scalar( @docs ); |
|---|
| 37 | | for my $doc (@docs) { |
|---|
| 38 | | #my $valgrind_options = "--show-below-main=yes --leak-check=full --show-reachable=yes -v"; |
|---|
| 39 | | my $valgrind_options = "--show-below-main=yes --leak-check=full --show-reachable=yes"; # -v removed |
|---|
| 40 | | my @output = `valgrind $valgrind_options swish-e -c conf/basic-libxml2.conf -i $doc -f 'blib/index/C025.index' -v 1 2>&1`; |
|---|
| 41 | | print STDERR @output; |
|---|
| 42 | | ok(1, "valgrind indexing $doc" ); |
|---|
| 43 | | } |
|---|
| | 25 | SKIP: { |
|---|
| | 26 | |
|---|
| | 27 | my $numtests = scalar(@docs); |
|---|
| | 28 | if ($ENV{TEST_VALGRIND}) { |
|---|
| | 29 | plan tests => $numtests; |
|---|
| | 30 | } else { |
|---|
| | 31 | plan skip_all => "not running valgrind test, set TEST_VALGRIND=1 to enable"; |
|---|
| | 32 | } |
|---|
| | 33 | |
|---|
| | 34 | my $valgrind = mywhich( "valgrind" ); |
|---|
| | 35 | unless( $valgrind ) { |
|---|
| | 36 | plan tests => 1; |
|---|
| | 37 | ok( 1, "skipping, valgrind not found" ); |
|---|
| | 38 | exit(0); |
|---|
| | 39 | } |
|---|
| | 40 | for my $doc (@docs) { |
|---|
| | 41 | #my $valgrind_options = "--show-below-main=yes --leak-check=full --show-reachable=yes -v"; |
|---|
| | 42 | my $valgrind_options = "--show-below-main=yes --leak-check=full --show-reachable=yes"; # -v removed |
|---|
| | 43 | my @output = `valgrind $valgrind_options swish-e -c conf/basic-libxml2.conf -i $doc -f 'blib/index/C025.index' -v 1 2>&1`; |
|---|
| | 44 | print STDERR @output; |
|---|
| | 45 | ok(1, "valgrind indexing $doc" ); |
|---|
| | 46 | } |
|---|
| | 47 | } |
|---|