ext: Force testlib to only create one Log object

Log object should remain being a singleton throughout the program.
The current code creates multiple Log objects, which at least
causes the issues of missing outputs in stdout.

E.g., "Logging call to command", which logs which command is
being called in a subprocess, is missing from stdout.

Change-Id: I96c5dd79c4f14e0a013c15d42d202397488d56b6
Signed-off-by: Hoa Nguyen <hoanguyen@ucdavis.edu>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/33715
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Bobby R. Bruce <bbruce@ucdavis.edu>
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
Maintainer: Jason Lowe-Power <power.jg@gmail.com>
This commit is contained in:
Hoa Nguyen
2020-08-29 02:35:11 -07:00
parent 5bce6dc526
commit c207628d1e

View File

@@ -77,7 +77,8 @@ class TestParameters(object):
def __init__(self, test, suite):
self.test = test
self.suite = suite
self.log = log.Log(test)
self.log = log.test_log
self.log.test = test
@helper.cacheresult
def _fixtures(self):