Changeset 4275

Show
Ignore:
Timestamp:
12/30/06 07:04:06 (7 years ago)
Author:
mmh
Message:

Run regression tests under valgrind, if it is available.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • lm-sensors/trunk/lib/test/test-scanner.pl

    r4234 r4275  
    4848plan tests => ($#scenarios + 1) * 3; 
    4949 
    50 $test = Test::Cmd->new(prog => 'test-scanner', workdir => ''); 
     50chomp(my $valgrind = `which valgrind 2>/dev/null`); 
     51 
     52if ($valgrind) { 
     53        $test = Test::Cmd->new(prog => "$valgrind --tool=memcheck --show-reachable=yes --leak-check=full --quiet ./test-scanner", workdir => ''); 
     54} else { 
     55        diag("Couldn't find valgrind(1), running tests without it..."); 
     56        $test = Test::Cmd->new(prog => "test-scanner", workdir => ''); 
     57} 
    5158 
    5259foreach $scenario (@scenarios) {