Skip to content

Commit

Permalink
[backend] always send back a log file in the badhost case
Browse files Browse the repository at this point in the history
Even if it does not exist or is empty.
  • Loading branch information
mlschroe committed Feb 13, 2019
1 parent 85de87c commit 9d10156
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/backend/bs_worker
Original file line number Diff line number Diff line change
Expand Up @@ -3887,7 +3887,13 @@ push @send, {name => 'logfile', filename => "$buildroot/.build.log"};
if ($code eq 'badhost') {
# only transmit the logfile in the badhost case
@send = ();
push @send, {name => 'logfile', filename => "$buildroot/.build.log"} if -s "$buildroot/.build.log";
if (-s "$buildroot/.build.log") {
push @send, {name => 'logfile', filename => "$buildroot/.build.log"};
} elsif (-e "$buildroot/.build.log") {
push @send, {name => 'logfile', data => "empty build log?\n"};
} else {
push @send, {name => 'logfile', data => "no build log?\n"};
}
}

if (!$testmode) {
Expand Down

0 comments on commit 9d10156

Please sign in to comment.