Report full untruncated log upon failure.

Signed-off-by: Keith Rothman <537074+litghost@users.noreply.github.com>
This commit is contained in:
Keith Rothman 2020-02-18 11:26:22 -08:00
parent 63ab362d2a
commit d6e4c28323
1 changed files with 13 additions and 4 deletions

View File

@ -622,14 +622,23 @@ def run_fuzzer(fuzzer_name, fuzzer_dir, fuzzer_logdir, logger, will_retry):
# Log the last 10,000 lines of stderr on a failure
log(
"""\
Failed @ {time_end} with exit code: {retcode}
--------------------------------------------------------------------------
{error_log}
!Failed! @ {time_end} with exit code: {retcode}
--------------------------------------------------------------------------
- STDOUT: -
--------------------------------------------------------------------------
{stdout_log}
--------------------------------------------------------------------------
- STDERR: -
--------------------------------------------------------------------------
{stderr_log}
--------------------------------------------------------------------------
!Failed! @ {time_end} with exit code: {retcode}
--------------------------------------------------------------------------
Failed @ {time_end} with exit code: {retcode}
""",
retcode=retcode,
error_log=error_log,
stdout_log=open(fuzzer_stdout).read(),
stderr_log=open(fuzzer_stderr).read(),
time_end=time_end.isoformat())
else:
# Log the last 100 lines of a successful run