mirror of
https://github.com/moparisthebest/curl
synced 2025-02-28 17:31:46 -05:00
Bertrand Demiddelaer made the testing work with valgrind 2.1
This commit is contained in:
parent
0e03165467
commit
115dd6f095
@ -75,6 +75,17 @@ my $memanalyze="./memanalyze.pl";
|
|||||||
|
|
||||||
my $stunnel = checkcmd("stunnel");
|
my $stunnel = checkcmd("stunnel");
|
||||||
my $valgrind = checkcmd("valgrind");
|
my $valgrind = checkcmd("valgrind");
|
||||||
|
|
||||||
|
my $valgrind_tool;
|
||||||
|
if($valgrind) {
|
||||||
|
# since valgrind 2.1.x, '--tool' option is mandatory
|
||||||
|
# use it, if it is supported by the version installed on the system
|
||||||
|
system("valgrind --help 2>&1 | grep -- --tool > /dev/null 2>&1");
|
||||||
|
if (($? >> 8)==0) {
|
||||||
|
$valgrind_tool="--tool=memcheck ";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
my $gdb = checkcmd("gdb");
|
my $gdb = checkcmd("gdb");
|
||||||
|
|
||||||
my $ssl_version; # set if libcurl is built with SSL support
|
my $ssl_version; # set if libcurl is built with SSL support
|
||||||
@ -1036,7 +1047,7 @@ sub singletest {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if($valgrind) {
|
if($valgrind) {
|
||||||
$CMDLINE = "valgrind --leak-check=yes --logfile=log/valgrind$testnum -q $CMDLINE";
|
$CMDLINE = "valgrind ".$valgrind_tool."--leak-check=yes --logfile=log/valgrind$testnum -q $CMDLINE";
|
||||||
}
|
}
|
||||||
|
|
||||||
$CMDLINE .= "$cmdargs >>$STDOUT 2>>$STDERR";
|
$CMDLINE .= "$cmdargs >>$STDOUT 2>>$STDERR";
|
||||||
|
Loading…
x
Reference in New Issue
Block a user