Jason Lowe-Power has submitted this change and it was merged. ( https://gem5-review.googlesource.com/c/public/gem5/+/4880 )

Change subject: configs: Always exit with code 0
......................................................................

configs: Always exit with code 0

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 <ja...@lowepower.com>
Reviewed-on: https://gem5-review.googlesource.com/4880
---
M configs/common/Simulation.py
1 file changed, 2 insertions(+), 2 deletions(-)

Approvals:
  Jason Lowe-Power: Looks good to me, approved; Looks good to me, approved



diff --git a/configs/common/Simulation.py b/configs/common/Simulation.py
index 6df90cb..f306a03 100644
--- a/configs/common/Simulation.py
+++ b/configs/common/Simulation.py
@@ -716,5 +716,5 @@
     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())

--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/4880
To unsubscribe, or for help writing mail filters, visit https://gem5-review.googlesource.com/settings

Gerrit-Project: public/gem5
Gerrit-Branch: master
Gerrit-Change-Id: I1983985d50311627574d4364b32ee961ae88e003
Gerrit-Change-Number: 4880
Gerrit-PatchSet: 12
Gerrit-Owner: Jason Lowe-Power <ja...@lowepower.com>
Gerrit-Reviewer: Andreas Sandberg <andreas.sandb...@arm.com>
Gerrit-Reviewer: Anthony Gutierrez <anthony.gutier...@amd.com>
Gerrit-Reviewer: Brandon Potter <brandon.pot...@amd.com>
Gerrit-Reviewer: Jason Lowe-Power <ja...@lowepower.com>
Gerrit-Reviewer: Nikos Nikoleris <nikos.nikole...@arm.com>
Gerrit-MessageType: merged
_______________________________________________
gem5-dev mailing list
gem5-dev@gem5.org
http://m5sim.org/mailman/listinfo/gem5-dev

Reply via email to