autotest: run dumpstack/dumpcore on stuck SITL process

This commit is contained in:
Peter Barker 2021-07-27 13:14:23 +10:00 committed by Peter Barker
parent b539a534e9
commit e1884bcd6e
2 changed files with 5 additions and 0 deletions

View File

@ -5865,6 +5865,11 @@ Also, ignores heartbeats not from our target system'''
self.progress("Not alive after test", send_statustext=False) self.progress("Not alive after test", send_statustext=False)
if self.sitl.isalive(): if self.sitl.isalive():
self.progress("pexpect says it is alive") self.progress("pexpect says it is alive")
for tool in "dumpstack.sh", "dumpcore.sh":
tool_filepath = os.path.join(self.rootdir(), 'Tools', 'scripts', tool)
if util.run_cmd([tool_filepath, str(self.sitl.pid)]) != 0:
self.progress("Failed %s" % (tool,))
return False
else: else:
self.progress("pexpect says it is dead") self.progress("pexpect says it is dead")
passed = False passed = False

0
Tools/scripts/dumpcore.sh Normal file → Executable file
View File