ext: Add timing indications to every TestCase
The log_call helper is now accepting a time parameter (dictionary). If the param is not None, the function will fill the timing indications (user and system time) for the TestCase. There are some TestCases whose user time is not of our interest; for example we don't really care about the cpu time of a stdout diff (MatchStdout tests). In those cases the resulting cpu time in the generated JUnit file (results.xml) will be 0. JIRA: https://gem5.atlassian.net/browse/GEM5-548 Change-Id: I53c1b59f8ad93900aeac06197e39189c00a9053c Signed-off-by: Giacomo Travaglini <giacomo.travaglini@arm.com> Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/32653 Tested-by: kokoro <noreply+kokoro@google.com>
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
# Copyright (c) 2019 ARM Limited
|
||||
# Copyright (c) 2019-2020 ARM Limited
|
||||
# All rights reserved
|
||||
#
|
||||
# The license below extends only to copyright in the software and shall
|
||||
@@ -124,6 +124,14 @@ class LoadedTestable(object):
|
||||
def runner(self):
|
||||
return self.obj.runner
|
||||
|
||||
@property
|
||||
def time(self):
|
||||
return self.metadata.time
|
||||
|
||||
@time.setter
|
||||
def time(self, value):
|
||||
self.metadata.time = value
|
||||
|
||||
# TODO Change log to provide status_update, result_update for all types.
|
||||
def log_status(self, status):
|
||||
import testlib.log as log
|
||||
|
||||
Reference in New Issue
Block a user