tests,python: Upgrading testlib to function with Python2

Change-Id: I9926b1507e9069ae8564c31bdd377b2b916462a2
Issue-on: https://gem5.atlassian.net/browse/GEM5-395
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/29088
Reviewed-by: Bobby R. Bruce <bbruce@ucdavis.edu>
Maintainer: Bobby R. Bruce <bbruce@ucdavis.edu>
Tested-by: kokoro <noreply+kokoro@google.com>
This commit is contained in:
Bobby R. Bruce
2020-04-16 11:55:17 -07:00
parent 80a2636983
commit 7ffd684334
31 changed files with 190 additions and 164 deletions

View File

@@ -44,9 +44,8 @@ loaded by the testlib :class:`testlib.loader.Loader`.
'''
import itertools
import log
import uid
from state import Status, Result
import testlib.uid as uid
from testlib.state import Status, Result
class TestCaseMetadata():
def __init__(self, name, uid, path, result, status, suite_uid):
@@ -127,9 +126,11 @@ class LoadedTestable(object):
# TODO Change log to provide status_update, result_update for all types.
def log_status(self, status):
import testlib.log as log
log.test_log.status_update(self, status)
def log_result(self, result):
import testlib.log as log
log.test_log.result_update(self, result)
def __iter__(self):