summaryrefslogtreecommitdiff
path: root/tests/runtests.pl
diff options
context:
space:
mode:
Diffstat (limited to 'tests/runtests.pl')
-rwxr-xr-xtests/runtests.pl12
1 files changed, 8 insertions, 4 deletions
diff --git a/tests/runtests.pl b/tests/runtests.pl
index 1e5ddb1e0..9dc9eb134 100755
--- a/tests/runtests.pl
+++ b/tests/runtests.pl
@@ -2329,9 +2329,11 @@ if($valgrind) {
# since valgrind 2.1.x, '--tool' option is mandatory
# use it, if it is supported by the version installed on the system
+ # (this happened in 2003, so we could probably don't need to care about
+ # that old version any longer and just delete this check)
runclient("valgrind --help 2>&1 | grep -- --tool > /dev/null 2>&1");
- if (($? >> 8)==0) {
- $valgrind_tool="--tool=memcheck";
+ if (($? >> 8)) {
+ $valgrind_tool="";
}
open(my $curlh, "<", "$CURL");
my $l = <$curlh>;
@@ -2342,14 +2344,16 @@ if($valgrind) {
close($curlh);
# valgrind 3 renamed the --logfile option to --log-file!!!
+ # (this happened in 2005, so we could probably don't need to care about
+ # that old version any longer and just delete this check)
my $ver=join(' ', runclientoutput("valgrind --version"));
# cut off all but digits and dots
$ver =~ s/[^0-9.]//g;
if($ver =~ /^(\d+)/) {
$ver = $1;
- if($ver >= 3) {
- $valgrind_logfile="--log-file";
+ if($ver < 3) {
+ $valgrind_logfile="--logfile";
}
}
}