Skip to content

Commit

Permalink
autotest: reset sitl if forced disarm fails
Browse files Browse the repository at this point in the history
  • Loading branch information
peterbarker committed Sep 10, 2022
1 parent 4caaf15 commit b06afa8
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion Tools/autotest/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -7231,7 +7231,10 @@ def run_one_test_attempt(self, test, interact=False, attempt=1, do_fail_list=Tru
if ex is None:
ex = ArmedAtEndOfTestException("Still armed at end of test")
self.progress("Armed at end of test; force-rebooting SITL")
self.disarm_vehicle(force=True)
try:
self.disarm_vehicle(force=True)
except AutoTestTimeoutException:
reset_needed = True
self.forced_post_test_sitl_reboots += 1
if reset_needed:
self.progress("Force-resetting SITL")
Expand Down

0 comments on commit b06afa8

Please sign in to comment.