Don't read entire log into RAM just to print it.
authorTim Newsome <tim@sifive.com>
Fri, 15 Sep 2017 19:03:52 +0000 (12:03 -0700)
committerTim Newsome <tim@sifive.com>
Fri, 15 Sep 2017 19:03:52 +0000 (12:03 -0700)
debug/testlib.py

index 3eeace91ff326600f51f2a77d59327cd95b39b01..996c188efb8aff2a0c41e063cad437322b5361d9 100644 (file)
@@ -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