Test: Show error output from hydra-queue-runner on timeout

This commit is contained in:
Eelco Dolstra 2016-10-06 17:18:10 +02:00
parent 6a313c691b
commit f2724d088d
2 changed files with 5 additions and 1 deletions

View file

@ -393,7 +393,7 @@ sub captureStdoutStderr {
if ($@) { if ($@) {
die unless $@ eq "timeout\n"; # propagate unexpected errors die unless $@ eq "timeout\n"; # propagate unexpected errors
return (-1, "", "timeout\n"); return (-1, $stdout, ($stderr // "") . "timeout\n");
} else { } else {
return ($?, $stdout, $stderr); return ($?, $stdout, $stderr);
} }

View file

@ -72,6 +72,10 @@ sub evalSucceeds {
sub runBuild { sub runBuild {
my ($build) = @_; my ($build) = @_;
my ($res, $stdout, $stderr) = captureStdoutStderr(60, ("hydra-queue-runner", "-vvvv", "--build-one", $build->id)); 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; return !$res;
} }