summaryrefslogtreecommitdiff
path: root/test/runtest
diff options
context:
space:
mode:
authorJeremy Harris <jgh146exb@wizmail.org>2016-02-07 12:12:19 +0000
committerJeremy Harris <jgh146exb@wizmail.org>2016-02-10 00:03:26 +0000
commit2c9f7ff8e77f13267519311c294eba51e5ea1b38 (patch)
treeff1a5bc7a4f3bf93e3de9ad9126caceea15d8941 /test/runtest
parent8ea69f926b5c97af51b7ae6666b80643f5456dbd (diff)
Testsuite: Support running exim under valgrind
Fails mostly thanks to lack of suid handling, but -be tests usable if you retry after de-suid of eximdir/exim
Diffstat (limited to 'test/runtest')
-rwxr-xr-xtest/runtest9
1 files changed, 7 insertions, 2 deletions
diff --git a/test/runtest b/test/runtest
index efcd3ed1c..8dcb0587c 100755
--- a/test/runtest
+++ b/test/runtest
@@ -38,6 +38,7 @@ $gnutls_dh_bits_normal = 2236;
$cf = "bin/cf -exact";
$cr = "\r";
$debug = 0;
+$flavour = 'FOO';
$force_continue = 0;
$force_update = 0;
$log_failed_filename = "failed-summary.log";
@@ -45,7 +46,7 @@ $more = "less -XF";
$optargs = "";
$save_output = 0;
$server_opts = "";
-$flavour = 'FOO';
+$valgrind = 0;
$have_ipv4 = 1;
$have_ipv6 = 1;
@@ -2149,7 +2150,10 @@ elsif (/^([A-Z_]+=\S+\s+)?(\d+)?\s*(sudo(?:\s+-u\s+(\w+))?\s+)?exim(_\S+)?\s+(.*
$args =~ s/(?:^|\s)-d\S*// if $optargs =~ /(?:^|\s)-d/;
- $cmd = "$envset$sudo$parm_cwd/eximdir/exim$special$optargs " .
+ my $opt_valgrind = $valgrind ? "valgrind --leak-check=yes --suppressions=$parm_cwd/aux-fixed/valgrind.supp " : "";
+
+ $cmd = "$envset$sudo$opt_valgrind" .
+ "$parm_cwd/eximdir/exim$special$optargs " .
"-DEXIM_PATH=$parm_cwd/eximdir/exim$special " .
"-C $parm_cwd/test-config $args " .
">>test-stdout 2>>test-stderr";
@@ -2404,6 +2408,7 @@ while (@ARGV > 0 && $ARGV[0] =~ /^-/)
if ($arg eq "-NOIPV4") { $have_ipv4 = 0; next; }
if ($arg eq "-NOIPV6") { $have_ipv6 = 0; next; }
if ($arg eq "-KEEP") { $save_output = 1; next; }
+ if ($arg eq "-VALGRIND") { $valgrind = 1; next; }
if ($arg =~ /^-FLAVOU?R$/) { $flavour = shift; next; }
}
$optargs .= " $arg";