summaryrefslogtreecommitdiff
path: root/src/systemc
diff options
context:
space:
mode:
authorGabe Black <gabeblack@google.com>2018-07-26 16:37:56 -0700
committerGabe Black <gabeblack@google.com>2018-09-11 21:50:31 +0000
commit71bb7df8ddafb8913e5ad2cfa05810795079e0d5 (patch)
treefe3cadcbe2c077f0eb8a1114af5a16c7ca93d961 /src/systemc
parentc1e24eda83ef1621842a24e810c8656dfe0fcbbc (diff)
downloadgem5-71bb7df8ddafb8913e5ad2cfa05810795079e0d5.tar.xz
systemc: Record the test's return code in the output directory.
verify.py will be able to use that value later to determine whether a test was successful. Change-Id: Ib499a4b6f202ee46e66e5de1b61a7e6309df9886 Reviewed-on: https://gem5-review.googlesource.com/12052 Reviewed-by: Gabe Black <gabeblack@google.com> Maintainer: Gabe Black <gabeblack@google.com>
Diffstat (limited to 'src/systemc')
-rwxr-xr-xsrc/systemc/tests/verify.py9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/systemc/tests/verify.py b/src/systemc/tests/verify.py
index cface4761..eabdaf6c1 100755
--- a/src/systemc/tests/verify.py
+++ b/src/systemc/tests/verify.py
@@ -144,7 +144,14 @@ class RunPhase(TestPhaseBase):
'--listener-mode=off',
config_path
])
- subprocess.check_call(cmd)
+ try:
+ subprocess.check_call(cmd)
+ except subprocess.CalledProcessError, error:
+ returncode = error.returncode
+ else:
+ returncode = 0
+ with open(os.path.join(test.m5out_dir(), 'returncode'), 'w') as rc:
+ rc.write('%d\n' % returncode)
runnable = filter(lambda t: not t.compile_only, tests)
if args.j == 1: