From: Tim Newsome Date: Fri, 15 Sep 2017 19:03:52 +0000 (-0700) Subject: Don't read entire log into RAM just to print it. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=38fc7c6a96f47499b738835b0f01a42edf093d39;p=riscv-tests.git Don't read entire log into RAM just to print it. --- diff --git a/debug/testlib.py b/debug/testlib.py index 3eeace9..996c188 100644 --- a/debug/testlib.py +++ b/debug/testlib.py @@ -540,8 +540,7 @@ def header(title, dash='-', length=78): def print_log(path): header(path) - lines = open(path, "r").readlines() - for l in lines: + for l in open(path, "r"): sys.stdout.write(l) print