Jason Lowe-Power has submitted this change and it was merged. (
https://gem5-review.googlesource.com/c/public/gem5/+/17452 )
Change subject: ext,tests: Add back failing exceptions
......................................................................
ext,tests: Add back failing exceptions
Change-Id: Idf4ba8a2a3888787abf33d1a4ac52fcf146ce732
Signed-off-by: Jason Lowe-Power <[email protected]>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/17452
Reviewed-by: Andreas Sandberg <[email protected]>
---
M ext/testlib/test.py
1 file changed, 16 insertions(+), 1 deletion(-)
Approvals:
Andreas Sandberg: Looks good to me, approved
Jason Lowe-Power: Looks good to me, approved
diff --git a/ext/testlib/test.py b/ext/testlib/test.py
index 8e2de49..18899d6 100644
--- a/ext/testlib/test.py
+++ b/ext/testlib/test.py
@@ -31,6 +31,21 @@
import helper
import runner as runner_mod
+class TestingException(Exception):
+ '''Common ancestor for manual Testing Exceptions.'''
+class TestFailException(TestingException):
+ '''Signals that a test has failed.'''
+class TestSkipException(TestingException):
+ '''Signals that a test has been skipped.'''
+
+def fail(message):
+ '''Cause the current test to fail with the given message.'''
+ raise TestFailException(message)
+
+def skip(message):
+ '''Cause the current test to skip with the given message.'''
+ raise TestSkipException(message)
+
class TestCase(object):
'''
Base class for all tests.
@@ -88,4 +103,4 @@
if function is not None:
return testfunctiondecorator(function)
else:
- return testfunctiondecorator
\ No newline at end of file
+ return testfunctiondecorator
--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/17452
To unsubscribe, or for help writing mail filters, visit
https://gem5-review.googlesource.com/settings
Gerrit-Project: public/gem5
Gerrit-Branch: master
Gerrit-Change-Id: Idf4ba8a2a3888787abf33d1a4ac52fcf146ce732
Gerrit-Change-Number: 17452
Gerrit-PatchSet: 3
Gerrit-Owner: Jason Lowe-Power <[email protected]>
Gerrit-Reviewer: Andreas Sandberg <[email protected]>
Gerrit-Reviewer: Anthony Gutierrez <[email protected]>
Gerrit-Reviewer: Giacomo Travaglini <[email protected]>
Gerrit-Reviewer: Jason Lowe-Power <[email protected]>
Gerrit-Reviewer: Sean Wilson <[email protected]>
Gerrit-MessageType: merged
_______________________________________________
gem5-dev mailing list
[email protected]
http://m5sim.org/mailman/listinfo/gem5-dev