diff options
author | Gabe Black <gabeblack@google.com> | 2018-09-07 01:37:57 -0700 |
---|---|---|
committer | Gabe Black <gabeblack@google.com> | 2018-10-09 21:39:36 +0000 |
commit | 3f3773757eb2cf5d62caf5e01adf8611c8684dde (patch) | |
tree | e6db18cba3949ee76802d10ffd6a64dcd8b4d276 /src/systemc/tests | |
parent | 51e3c33ed41da2204c952792993b408917c6e522 (diff) | |
download | gem5-3f3773757eb2cf5d62caf5e01adf8611c8684dde.tar.xz |
systemc: Fortify how exceptions are caught and passed around.
This change tightens up exception catching and makes gem5's systemc
code react to exceptions more in line with the Accellera
implementation. This prevents exceptions from being caught by the
pybind11 integration which makes it very difficult to see where an
exception came from, and makes the output differ by including a
(mostly useless) backtrace.
Change-Id: I7130d53a98fadd137073d1718f780f32f57c658c
Reviewed-on: https://gem5-review.googlesource.com/c/12601
Reviewed-by: Gabe Black <gabeblack@google.com>
Maintainer: Gabe Black <gabeblack@google.com>
Diffstat (limited to 'src/systemc/tests')
-rwxr-xr-x | src/systemc/tests/config.py | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/systemc/tests/config.py b/src/systemc/tests/config.py index 439a6828c..d9ae74994 100755 --- a/src/systemc/tests/config.py +++ b/src/systemc/tests/config.py @@ -31,6 +31,7 @@ import argparse import m5 import os import re +import sys from m5.objects import SystemC_Kernel, Root @@ -58,7 +59,5 @@ if result.code != 0: # generate errors, and as long as their output matches that's still # considered correct. A "real" systemc config should expect sc_main # (if present) not to fail. - scrubbed = re.sub(r'In file: .*$', - 'In file: <removed by verify.pl>', - result.message) - print('\n' + scrubbed) + print('\n' + result.message) + sys.exit(int(result.code)) |