Changeset 2119

Show
Ignore:
Timestamp:
04/14/08 13:18:54 (1 month ago)
Author:
joshr
Message:

fix how we skip tests if valgrind not installed.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • Swishetest/trunk/t/025-valgrind.t

    r2091 r2119  
    2626 
    2727        my $numtests = scalar(@docs); 
    28         if ($ENV{TEST_VALGRIND}) { 
     28        my $valgrind = mywhich( "valgrind" ); 
     29        if ($ENV{TEST_VALGRIND} && $valgrind) { 
    2930            plan tests => $numtests; 
    3031        } else { 
    31             plan skip_all => "not running valgrind test, set TEST_VALGRIND=1 to enable"; 
     32            plan skip_all => "not running valgrind test, install valgrind and set env TEST_VALGRIND=1 to enable"; 
    3233        } 
    3334         
    34         my $valgrind = mywhich( "valgrind" ); 
    35         unless( $valgrind ) { 
    36             plan tests => 1; 
    37             ok( 1, "skipping, valgrind not found" ); 
    38             exit(0); 
    39         } 
    4035        for my $doc (@docs) { 
    4136            #my $valgrind_options = "--show-below-main=yes --leak-check=full --show-reachable=yes -v";