Browse Source

Tools: autotest: ensure reboot if dataflash-over-mavlink test fails

Will stop cascading failures from occuring
mission-4.1.18
Peter Barker 6 years ago committed by Peter Barker
parent
commit
4a237af093
  1. 7
      Tools/autotest/common.py

7
Tools/autotest/common.py

@ -2076,6 +2076,8 @@ class AutoTest(ABC): @@ -2076,6 +2076,8 @@ class AutoTest(ABC):
def test_dataflash_over_mavlink(self):
self.context_push()
ex = None
try:
self.set_parameter("LOG_BACKEND_TYPE", 3)
self.reboot_sitl()
self.wait_ready_to_arm()
@ -2089,8 +2091,13 @@ class AutoTest(ABC): @@ -2089,8 +2091,13 @@ class AutoTest(ABC):
self.drain_mav() # hopefully draining COMMAND_ACK from that failed arm
self.arm_vehicle()
self.disarm_vehicle()
except Exception as e:
self.progress("Exception (%s) caught" % str(e))
ex = e
self.context_pop()
self.reboot_sitl()
if ex is not None:
raise ex
def test_arm_feature(self):
"""Common feature to test."""

Loading…
Cancel
Save