From 7c5103e7f35fb04ee5095599177bf6381309ff44 Mon Sep 17 00:00:00 2001 From: Tim 'mithro' Ansell Date: Wed, 6 Feb 2019 22:15:28 -0800 Subject: [PATCH] Only save the last 1000 lines to XML file. Signed-off-by: Tim 'mithro' Ansell --- fuzzers/run_fuzzer.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/fuzzers/run_fuzzer.py b/fuzzers/run_fuzzer.py index 50b198a6..62fbc6b4 100755 --- a/fuzzers/run_fuzzer.py +++ b/fuzzers/run_fuzzer.py @@ -386,13 +386,13 @@ def main(argv): tc.name = "Run {}".format(i) if tc.stdout.startswith('file://'): pretty = False - with open(tc.stdout[7:]) as fd: - tc.stdout = fd.read() + tc.stdout = "\n".join( + last_lines(open(tc.stdout[7:]), 1000)) if tc.stderr.startswith('file://'): pretty = False - with open(tc.stderr[7:]) as fd: - tc.stderr = fd.read() + tc.stderr = "\n".join( + last_lines(open(tc.stderr[7:]), 1000)) ts = junit_xml.TestSuite(args.fuzzer, test_cases) tsfilename = os.path.join(fuzzer_logdir, 'sponge_log.xml')