From 99168a84a973c38a00ce72243d738bf5015acef0 Mon Sep 17 00:00:00 2001 From: Michael Stapelberg Date: Sun, 18 Sep 2011 15:35:04 +0100 Subject: [PATCH] tests: also make launch_with_config() log to LOGPATH --- testcases/complete-run.pl | 2 +- testcases/t/lib/i3test.pm | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/testcases/complete-run.pl b/testcases/complete-run.pl index 6f00877c..8f740d8c 100755 --- a/testcases/complete-run.pl +++ b/testcases/complete-run.pl @@ -242,7 +242,7 @@ sub take_job { my $output; my $parser = TAP::Parser->new({ - exec => [ 'sh', '-c', "DISPLAY=$display /usr/bin/perl -It/lib $test" ], + exec => [ 'sh', '-c', qq|DISPLAY=$display LOGPATH="$logpath" /usr/bin/perl -It/lib $test| ], spool => IO::Scalar->new(\$output), merge => 1, }); diff --git a/testcases/t/lib/i3test.pm b/testcases/t/lib/i3test.pm index 749b89b7..3d2d85af 100644 --- a/testcases/t/lib/i3test.pm +++ b/testcases/t/lib/i3test.pm @@ -259,7 +259,10 @@ sub launch_with_config { say $fh "ipc-socket $tmp_socket_path"; close($fh); - my $i3cmd = "exec " . abs_path("../i3") . " -V -d all --disable-signalhandler -c $tmpfile >/dev/null 2>/dev/null"; + # Use $ENV{LOGPATH}, gets set in complete-run.pl. We append instead of + # overwrite because there might be multiple instances of i3 running during + # one test case. + my $i3cmd = "exec " . abs_path("../i3") . " -V -d all --disable-signalhandler -c $tmpfile >>$ENV{LOGPATH} 2>&1"; my $process = Proc::Background->new($i3cmd); sleep 1; -- 2.39.5