From 4c40640238fea2af53cf0865ff218056d96c7947 Mon Sep 17 00:00:00 2001 From: Peter Barker Date: Wed, 25 Sep 2019 12:45:01 +1000 Subject: [PATCH] Tools: autotest: tidy handling of armed-at-end-of-test handling --- Tools/autotest/common.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Tools/autotest/common.py b/Tools/autotest/common.py index e4a90807eb..93b65b9a1e 100644 --- a/Tools/autotest/common.py +++ b/Tools/autotest/common.py @@ -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): 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