autotest: retry SITL connect many times while running under GDB

Allows for easier debugging under gdb when checking startup code
This commit is contained in:
Peter Barker 2021-06-10 14:17:28 +10:00 committed by Peter Barker
parent 0b517cfc57
commit 96e14d470a
1 changed files with 4 additions and 1 deletions

View File

@ -5650,9 +5650,12 @@ Also, ignores heartbeats not from our target system'''
def get_mavlink_connection_going(self): def get_mavlink_connection_going(self):
# get a mavlink connection going # get a mavlink connection going
try: try:
retries = 20
if self.gdb:
retries = 20000
self.mav = mavutil.mavlink_connection( self.mav = mavutil.mavlink_connection(
self.autotest_connection_string_to_ardupilot(), self.autotest_connection_string_to_ardupilot(),
retries=20, retries=retries,
robust_parsing=True, robust_parsing=True,
source_system=250, source_system=250,
source_component=250, source_component=250,