autotest: explicitly fail reboot if armed

This commit is contained in:
Peter Barker 2022-09-18 18:50:10 +10:00 committed by Peter Barker
parent a4c88ab2c0
commit 0e9abea655
1 changed files with 2 additions and 0 deletions

View File

@ -1973,6 +1973,8 @@ class AutoTest(ABC):
def reboot_sitl(self, required_bootcount=None):
"""Reboot SITL instance and wait for it to reconnect."""
if self.armed():
raise NotAchievedException("Reboot attempted while armed")
self.progress("Rebooting SITL")
self.reboot_sitl_mav(required_bootcount=required_bootcount)
self.do_heartbeats(force=True)