Gabe Black has uploaded this change for review. (
https://gem5-review.googlesource.com/c/public/gem5/+/12446
Change subject: systemc: Teach verify.py how to expect failing error codes.
......................................................................
systemc: Teach verify.py how to expect failing error codes.
Some tests expect to fail. For those tests (and only those tests) we
need to tell verify.py that it's ok if their exit status isn't 0. Also
if those tests *don't* fail, then that will also be flagged as an
error.
This is done by adding an expected_returncode file into the test's
source directory which holds what the expected return code should be.
Change-Id: I239a28e1d98dd3f76b71028660e492f675a0b3cb
---
M src/systemc/tests/verify.py
1 file changed, 13 insertions(+), 2 deletions(-)
diff --git a/src/systemc/tests/verify.py b/src/systemc/tests/verify.py
index c2605a2..57e2c7d 100755
--- a/src/systemc/tests/verify.py
+++ b/src/systemc/tests/verify.py
@@ -78,6 +78,9 @@
def src_dir(self):
return os.path.join(script_dir, self.path)
+ def expected_returncode_file(self):
+ return os.path.join(self.src_dir(), 'expected_returncode')
+
def golden_dir(self):
return os.path.join(self.src_dir(), 'golden')
@@ -383,11 +386,19 @@
with open(test.returncode_file()) as rc:
returncode = int(rc.read())
+ expected_returncode = 0
+ if os.path.exists(test.expected_returncode_file()):
+ with open(test.expected_returncode_file()) as erc:
+ expected_returncode = int(erc.read())
+
if returncode == 124:
self.failed(test, 'time out')
continue
- elif returncode != 0:
- self.failed(test, 'abort')
+ elif returncode != expected_returncode:
+ if expected_returncode == 0:
+ self.failed(test, 'abort')
+ else:
+ self.failed(test, 'missed abort')
continue
out_dir = test.m5out_dir()
--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/12446
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: I239a28e1d98dd3f76b71028660e492f675a0b3cb
Gerrit-Change-Number: 12446
Gerrit-PatchSet: 1
Gerrit-Owner: Gabe Black <[email protected]>
Gerrit-MessageType: newchange
_______________________________________________
gem5-dev mailing list
[email protected]
http://m5sim.org/mailman/listinfo/gem5-dev