complete-run: implement --valgrind

This commit is contained in:
Michael Stapelberg
2011-11-07 20:53:49 +00:00
parent 389fdcf79f
commit 1c0d69d4e6
3 changed files with 12 additions and 1 deletions

View File

@ -78,6 +78,13 @@ sub activate_i3 {
# the interactive signalhandler to make it crash immediately instead.
my $i3cmd = abs_path("../i3") . " -V -d all --disable-signalhandler";
if ($args{valgrind}) {
$i3cmd =
qq|valgrind -v --log-file="$args{outdir}/valgrind.log" | .
qq|--leak-check=full --track-origins=yes --num-callers=20 | .
qq|--tool=memcheck -- $i3cmd|;
}
# Append to $args{logpath} instead of overwriting because i3 might be
# run multiple times in one testcase.
my $cmd = "exec $i3cmd -c $args{configfile} >>$args{logpath} 2>&1";

View File

@ -435,6 +435,7 @@ sub launch_with_config {
configfile => $tmpfile,
outdir => $ENV{OUTDIR},
logpath => $ENV{LOGPATH},
valgrind => $ENV{VALGRIND},
cv => $cv,
);