complete-run: make --valgrind, --strace, --coverage-testing work again

This commit is contained in:
Michael Stapelberg
2012-01-27 21:36:40 +00:00
parent cc2fda9242
commit d22458cde0
2 changed files with 23 additions and 10 deletions

View File

@ -13,13 +13,17 @@ our @EXPORT = qw(worker worker_next);
use File::Basename qw(basename);
my @x;
my $options;
sub worker {
my ($display, $x, $outdir) = @_;
my ($display, $x, $outdir, $optref) = @_;
# make sure $x hangs around
push @x, $x;
# store the options hashref
$options = $optref;
socketpair(my $ipc_child, my $ipc, AF_UNIX, SOCK_DGRAM, PF_UNSPEC)
or die "socketpair: $!";
@ -102,7 +106,13 @@ sub worker_wait {
$test->todo_output(\*STDOUT);
@ENV{qw(DISPLAY TESTNAME OUTDIR VALGRIND STRACE COVERAGE RESTART)}
= ($self->{display}, basename($file), $outdir, 0, 0, 0, 0);
= ($self->{display},
basename($file),
$outdir,
$options->{valgrind},
$options->{strace},
$options->{coverage},
$options->{restart});
package main;
local $@;