mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-02-22 07:44:03 -04:00
autotest: print content of sitl /proc/PID/status on death
Mysterious death ofi Copter in CI - add more debug
This commit is contained in:
parent
f86b2c1051
commit
bb973ac913
@ -6057,6 +6057,11 @@ Also, ignores heartbeats not from our target system'''
|
||||
pass
|
||||
self.progress("Most recent logfile: %s" % (path, ), send_statustext=send_statustext)
|
||||
|
||||
def progress_file_content(self, filepath):
|
||||
with open(filepath) as f:
|
||||
for line in f:
|
||||
self.progress(line.rstrip())
|
||||
|
||||
def run_one_test_attempt(self, test, interact=False, attempt=1, do_fail_list=True):
|
||||
'''called by run_one_test to actually run the test in a retry loop'''
|
||||
name = test.name
|
||||
@ -6112,7 +6117,7 @@ Also, ignores heartbeats not from our target system'''
|
||||
ardupilot_alive = True
|
||||
except Exception:
|
||||
# process is dead
|
||||
self.progress("Not alive after test", send_statustext=False)
|
||||
self.progress("No heartbeat after test", send_statustext=False)
|
||||
if self.sitl.isalive():
|
||||
self.progress("pexpect says it is alive")
|
||||
for tool in "dumpstack.sh", "dumpcore.sh":
|
||||
@ -6122,6 +6127,15 @@ Also, ignores heartbeats not from our target system'''
|
||||
return False
|
||||
else:
|
||||
self.progress("pexpect says it is dead")
|
||||
|
||||
# try dumping the process status file for more information:
|
||||
status_filepath = "/proc/%u/status" % self.sitl.pid
|
||||
self.progress("Checking for status filepath (%s)" % status_filepath)
|
||||
if os.path.exists(status_filepath):
|
||||
self.progress_file_content(status_filepath)
|
||||
else:
|
||||
self.progress("... does not exist")
|
||||
|
||||
passed = False
|
||||
reset_needed = True
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user