summaryrefslogtreecommitdiffstats
path: root/src/build/debug
diff options
context:
space:
mode:
authorJaymes Wilks <mjwilks@us.ibm.com>2017-12-08 11:02:32 -0600
committerDaniel M. Crowell <dcrowell@us.ibm.com>2018-01-11 14:37:14 -0500
commit2a032fa76a4ec61eb15d3381b7bf5000368589d2 (patch)
tree40ad939678e7bfd5c196999c87124c2df3b7bd60 /src/build/debug
parent443f2c73ac82703b8db6dd6f371a84a5bf61795b (diff)
downloadtalos-hostboot-2a032fa76a4ec61eb15d3381b7bf5000368589d2.tar.gz
talos-hostboot-2a032fa76a4ec61eb15d3381b7bf5000368589d2.zip
Continue to run simics on lack of write access for trace files
For situations like continuous integration, it is helpful to have simics continue to run even without write access for hbTracMERG and hbTracBINARY. This change will handle the exception via printing the error to the simics console and then move on. Change-Id: If672c5c99fd2804a40e4d56687e16535cf7bf867 CQ:SW380662 Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/50716 Tested-by: Jenkins Server <pfd-jenkins+hostboot@us.ibm.com> Tested-by: Jenkins OP Build CI <op-jenkins+hostboot@us.ibm.com> Tested-by: Jenkins OP HW <op-hw-jenkins+hostboot@us.ibm.com> Reviewed-by: Stephen M. Cprek <smcprek@us.ibm.com> Reviewed-by: Michael Baiocchi <mbaiocch@us.ibm.com> Reviewed-by: William G. Hoffa <wghoffa@us.ibm.com> Reviewed-by: Daniel M. Crowell <dcrowell@us.ibm.com>
Diffstat (limited to 'src/build/debug')
-rw-r--r--src/build/debug/simics-debug-framework.py16
1 files changed, 15 insertions, 1 deletions
diff --git a/src/build/debug/simics-debug-framework.py b/src/build/debug/simics-debug-framework.py
index e087f9d8d..081ab4dc9 100644
--- a/src/build/debug/simics-debug-framework.py
+++ b/src/build/debug/simics-debug-framework.py
@@ -337,6 +337,17 @@ def register_hb_debug_framework_tools():
doc = usage)
print "Hostboot Debug Framework: Registered tool:", "hb-" + tool
+ # Do a quick file write test to make sure we can write files and set a
+ # simics variable to let us know if we need to avoid file writes.
+ SIM_run_command("$fileSystemOk=1")
+ try:
+ f = open('hbTracTEST', 'w')
+ f.write("\n")
+ f.close()
+ os.system("rm -rf hbTracTEST")
+ except:
+ SIM_run_command("$fileSystemOk=0")
+
# Return a number/address built from the input list elements. Each element
# in the input is a string representation of a byte-sized hex number, for
@@ -688,7 +699,10 @@ def magic_instruction_callback(user_arg, cpu, arg):
saveCommand = "%s; %s; %s"%(cmd1,cmd2,cmd3)
#print "Command=%s" % (saveCommand)
- SIM_run_alone(run_command, saveCommand )
+ if (simenv.fileSystemOk == 1):
+ SIM_run_alone(run_command, saveCommand )
+ else:
+ print "Unable to write traces. Continuing..."
#file = open("hb_trace_debug.dat", "a")
#file.write("%s\n" % (saveCommand))
OpenPOWER on IntegriCloud