diff options
Diffstat (limited to 'src/systemc')
-rwxr-xr-x | src/systemc/tests/config.py | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/src/systemc/tests/config.py b/src/systemc/tests/config.py index 7e2dd558c..4b143d109 100755 --- a/src/systemc/tests/config.py +++ b/src/systemc/tests/config.py @@ -27,9 +27,8 @@ from __future__ import print_function -import logging - import m5 +import re from m5.objects import SystemC_Kernel, Root @@ -43,4 +42,14 @@ kernel.sc_main("Hello", "World"); m5.instantiate(None) cause = m5.simulate(m5.MaxTick).getCause() -logging.info('Exiting @ tick %i because %s', m5.curTick(), cause) + +result = kernel.sc_main_result() +if result.code != 0: + # Arguably this should make gem5 fail, but some tests purposefully + # 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) |