tests: implement --xtrace in complete-run.pl

This commit is contained in:
Michael Stapelberg
2012-08-04 00:51:41 +02:00
parent 1b3435807a
commit 077e021e26
4 changed files with 18 additions and 1 deletions

View File

@ -124,6 +124,14 @@ sub activate_i3 {
'sh -c "export LISTEN_PID=\$\$; ' . $cmd . '"';
}
if ($args{xtrace}) {
my $out = "$outdir/xtrace-for-$test.log";
# See comment in $args{strace} branch.
$cmd = qq|xtrace -n -o "$out" -- | .
'sh -c "export LISTEN_PID=\$\$; ' . $cmd . '"';
}
# We need to use the shell due to using output redirections.
exec '/bin/sh', '-c', $cmd;

View File

@ -105,12 +105,13 @@ sub worker_wait {
$test->failure_output(\*STDERR);
$test->todo_output(\*STDOUT);
@ENV{qw(DISPLAY TESTNAME OUTDIR VALGRIND STRACE COVERAGE RESTART)}
@ENV{qw(DISPLAY TESTNAME OUTDIR VALGRIND STRACE XTRACE COVERAGE RESTART)}
= ($self->{display},
basename($file),
$outdir,
$options->{valgrind},
$options->{strace},
$options->{xtrace},
$options->{coverage},
$options->{restart});

View File

@ -547,6 +547,7 @@ sub launch_with_config {
testname => $ENV{TESTNAME},
valgrind => $ENV{VALGRIND},
strace => $ENV{STRACE},
xtrace => $ENV{XTRACE},
restart => $ENV{RESTART},
cv => $cv,
dont_create_temp_dir => $args{dont_create_temp_dir},