configs: Always exit with code 0
authorJason Lowe-Power <jason@lowepower.com>
Fri, 22 Sep 2017 00:52:00 +0000 (17:52 -0700)
committerJason Lowe-Power <jason@lowepower.com>
Fri, 17 Aug 2018 16:37:42 +0000 (16:37 +0000)
Update simulation.py to always exit with code 0 assuming the simulation
exits normally. If the running application has a return code that is non
zero, then print the return code before exiting.

Change-Id: I1983985d50311627574d4364b32ee961ae88e003
Signed-off-by: Jason Lowe-Power <jason@lowepower.com>
Reviewed-on: https://gem5-review.googlesource.com/4880

configs/common/Simulation.py

index 6df90cb6c9affc054128d08cc8a85a0bbc13072c..f306a035885609a0277a4182b0bb75f02eac0ee4 100644 (file)
@@ -716,5 +716,5 @@ def run(options, root, testsys, cpu_class):
     if options.checkpoint_at_end:
         m5.checkpoint(joinpath(cptdir, "cpt.%d"))
 
-    if not m5.options.interactive:
-        sys.exit(exit_event.getCode())
+    if exit_event.getCode() != 0:
+        print("Simulated exit code not 0! Exit code is", exit_event.getCode())