From b06afa83169b1e3bad4f91994c5d3d28a03b3242 Mon Sep 17 00:00:00 2001 From: Peter Barker Date: Fri, 9 Sep 2022 17:33:43 +1000 Subject: [PATCH] autotest: reset sitl if forced disarm fails --- Tools/autotest/common.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Tools/autotest/common.py b/Tools/autotest/common.py index 5f98b31fd0..899d4c62fa 100644 --- a/Tools/autotest/common.py +++ b/Tools/autotest/common.py @@ -7231,7 +7231,10 @@ Also, ignores heartbeats not from our target system''' 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")