diff options
author | Lluís Vilanova <vilanova@ac.upc.edu> | 2013-01-08 08:54:12 -0500 |
---|---|---|
committer | Lluís Vilanova <vilanova@ac.upc.edu> | 2013-01-08 08:54:12 -0500 |
commit | 807168a1de1b101622d084c5fe160cf41ff3f59d (patch) | |
tree | 171b272f8fa038c30aceb957a0e259f9419be775 /configs/common/Simulation.py | |
parent | 858d99b7cc6515aa6a0e75859aa7b5f460b40bb7 (diff) | |
download | gem5-807168a1de1b101622d084c5fe160cf41ff3f59d.tar.xz |
util: add m5_fail op.
Used as a command in full-system scripts helps the user ensure the benchmarks have finished successfully.
For example, one can use:
/path/to/benchmark args || /sbin/m5 fail 1
and thus ensure gem5 will exit with an error if the benchmark fails.
Diffstat (limited to 'configs/common/Simulation.py')
-rw-r--r-- | configs/common/Simulation.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/configs/common/Simulation.py b/configs/common/Simulation.py index ea5949efc..406f9ef0f 100644 --- a/configs/common/Simulation.py +++ b/configs/common/Simulation.py @@ -27,6 +27,7 @@ # # Authors: Lisa Hsu +import sys from os import getcwd from os.path import join as joinpath @@ -505,3 +506,5 @@ def run(options, root, testsys, cpu_class): print 'Exiting @ tick %i because %s' % (m5.curTick(), exit_cause) if options.checkpoint_at_end: m5.checkpoint(joinpath(cptdir, "cpt.%d")) + + sys.exit(exit_event.getCode()) |