aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTim Newsome <tim@sifive.com>2017-09-15 12:03:52 -0700
committerTim Newsome <tim@sifive.com>2017-09-15 12:03:52 -0700
commit38fc7c6a96f47499b738835b0f01a42edf093d39 (patch)
treea227cdc0367655ccf9d360ba473ab294bece7b71
parent910f39c9b46a883d58f0b77ae847c535834a48da (diff)
downloadriscv-tests-38fc7c6a96f47499b738835b0f01a42edf093d39.zip
riscv-tests-38fc7c6a96f47499b738835b0f01a42edf093d39.tar.gz
riscv-tests-38fc7c6a96f47499b738835b0f01a42edf093d39.tar.bz2
Don't read entire log into RAM just to print it.
-rw-r--r--debug/testlib.py3
1 files changed, 1 insertions, 2 deletions
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