From 96e14d470abeec17ed3386fae3ce5be95e8d22ed Mon Sep 17 00:00:00 2001 From: Peter Barker Date: Thu, 10 Jun 2021 14:17:28 +1000 Subject: [PATCH] autotest: retry SITL connect many times while running under GDB Allows for easier debugging under gdb when checking startup code --- Tools/autotest/common.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Tools/autotest/common.py b/Tools/autotest/common.py index ce1f316632..67feb164a8 100644 --- a/Tools/autotest/common.py +++ b/Tools/autotest/common.py @@ -5650,9 +5650,12 @@ Also, ignores heartbeats not from our target system''' def get_mavlink_connection_going(self): # get a mavlink connection going try: + retries = 20 + if self.gdb: + retries = 20000 self.mav = mavutil.mavlink_connection( self.autotest_connection_string_to_ardupilot(), - retries=20, + retries=retries, robust_parsing=True, source_system=250, source_component=250,