From 807168a1de1b101622d084c5fe160cf41ff3f59d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Llu=C3=ADs=20Vilanova?= Date: Tue, 8 Jan 2013 08:54:12 -0500 Subject: 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. --- configs/common/Simulation.py | 3 +++ 1 file changed, 3 insertions(+) (limited to 'configs') 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()) -- cgit v1.2.3