Browse Source

Tools: autotest: tidy handling of armed-at-end-of-test handling

master
Peter Barker 5 years ago committed by Peter Barker
parent
commit
4c40640238
  1. 4
      Tools/autotest/common.py

4
Tools/autotest/common.py

@ -109,6 +109,9 @@ class PreconditionFailedException(ErrorException): @@ -109,6 +109,9 @@ class PreconditionFailedException(ErrorException):
"""Thrown when a precondition for a test is not met"""
pass
class ArmedAtEndOfTestException(ErrorException):
"""Created when test left vehicle armed"""
pass
class Context(object):
def __init__(self):
@ -2053,6 +2056,7 @@ class AutoTest(ABC): @@ -2053,6 +2056,7 @@ class AutoTest(ABC):
self.wait_heartbeat()
if self.armed():
ex = ArmedAtEndOfTestException("Still armed at end of test")
self.progress("Armed at end of test; force-rebooting SITL")
self.disarm_vehicle(force=True)
self.forced_post_test_sitl_reboots += 1

Loading…
Cancel
Save