From b7eca630733a4921aba9af2443c4efccd7f43afd Mon Sep 17 00:00:00 2001 From: Peter Barker Date: Fri, 12 Apr 2019 21:36:41 +1000 Subject: [PATCH] Tools: autotest: send statustext with test name to autopilot This gets logged into the dataflash so you can quickly find relevant logs --- Tools/autotest/common.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Tools/autotest/common.py b/Tools/autotest/common.py index 4af0de3909..30b4c90667 100644 --- a/Tools/autotest/common.py +++ b/Tools/autotest/common.py @@ -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()