Tools: autotest: send statustext with test name to autopilot

This gets logged into the dataflash so you can quickly find relevant
logs
This commit is contained in:
Peter Barker 2019-04-12 21:36:41 +10:00 committed by Peter Barker
parent 2c682c7001
commit b7eca63073

View File

@ -1782,6 +1782,9 @@ class AutoTest(ABC):
fmt = "%" + str(longest) + "s: %.2fs"
self.progress(fmt % (desc, time))
def send_statustext(self, text):
self.mav.mav.statustext_send(mavutil.mavlink.MAV_SEVERITY_WARNING, text),
def run_one_test(self, name, desc, test_function, interact=False):
'''new-style run-one-test used by run_tests'''
test_output_filename = self.buildlogs_path("%s-%s.txt" %
@ -1789,6 +1792,7 @@ class AutoTest(ABC):
tee = TeeBoth(test_output_filename, 'w', self.mavproxy_logfile)
prettyname = "%s (%s)" % (name, desc)
self.send_statustext(prettyname)
self.start_test(prettyname)
self.context_push()