diff --git a/src/lib/Hydra/Helper/Nix.pm b/src/lib/Hydra/Helper/Nix.pm index cba34cc4..958da4d1 100644 --- a/src/lib/Hydra/Helper/Nix.pm +++ b/src/lib/Hydra/Helper/Nix.pm @@ -393,7 +393,7 @@ sub captureStdoutStderr { if ($@) { die unless $@ eq "timeout\n"; # propagate unexpected errors - return (-1, "", "timeout\n"); + return (-1, $stdout, ($stderr // "") . "timeout\n"); } else { return ($?, $stdout, $stderr); } diff --git a/tests/Setup.pm b/tests/Setup.pm index 209d950d..9985cca2 100644 --- a/tests/Setup.pm +++ b/tests/Setup.pm @@ -72,6 +72,10 @@ sub evalSucceeds { sub runBuild { my ($build) = @_; my ($res, $stdout, $stderr) = captureStdoutStderr(60, ("hydra-queue-runner", "-vvvv", "--build-one", $build->id)); + if ($res) { + print STDERR "Queue runner stdout: $stdout\n" if $stdout ne ""; + print STDERR "Queue runner stderr: $stderr\n" if $stderr ne ""; + } return !$res; }