ext,tests: Make return code based on test results
This patch also fixes a spelling mistake. Change-Id: I8635216e512c10913a9cda54541d7e31e0d22a40 Signed-off-by: Jason Lowe-Power <jason@lowepower.com> Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/17450 Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com>
This commit is contained in:
@@ -166,6 +166,18 @@ class ResultHandler(log.Handler):
|
||||
self._closed = True
|
||||
self._save()
|
||||
|
||||
def unsuccessful(self):
|
||||
'''
|
||||
Performs an or reduce on all of the results.
|
||||
Returns true if at least one test is unsuccessful, false when all tests
|
||||
pass
|
||||
'''
|
||||
for suite_result in self.internal_results:
|
||||
if suite_result.unsuccessful:
|
||||
return True
|
||||
# If all are successful, then this wasn't "unsuccessful"
|
||||
return False
|
||||
|
||||
|
||||
#TODO Change from a handler to an internal post processor so it can be used
|
||||
# to reprint results
|
||||
|
||||
Reference in New Issue
Block a user