autotest: stop passing defaults in via --defaults to custom_sitl_commandline

This commit is contained in:
Peter Barker 2024-04-18 11:12:37 +10:00 committed by Peter Barker
parent ca4fd52b95
commit 5ba8755802
4 changed files with 13 additions and 5 deletions

View File

@ -7652,7 +7652,8 @@ class AutoTestCopter(vehicle_test_suite.TestSuite):
ex = None
try:
self.customise_SITL_commandline(
["--defaults", ','.join(self.model_defaults_filepath('Callisto'))],
[],
defaults_filepath=self.model_defaults_filepath('Callisto'),
model="octa-quad:@ROMFS/models/Callisto.json",
wipe=True,
)
@ -8847,7 +8848,8 @@ class AutoTestCopter(vehicle_test_suite.TestSuite):
def Callisto(self):
'''Test Callisto'''
self.customise_SITL_commandline(
["--defaults", ','.join(self.model_defaults_filepath('Callisto')), ],
[],
defaults_filepath=self.model_defaults_filepath('Callisto'),
model="octa-quad:@ROMFS/models/Callisto.json",
wipe=True,
)

View File

@ -3917,7 +3917,8 @@ class AutoTestPlane(vehicle_test_suite.TestSuite):
if not isinstance(defaults, list):
defaults = [defaults]
self.customise_SITL_commandline(
["--defaults", ','.join(defaults), ],
[],
defaults_filepath=defaults,
model=model,
wipe=True,
)

View File

@ -199,7 +199,8 @@ class AutoTestHelicopter(AutoTestCopter):
if not isinstance(defaults, list):
defaults = [defaults]
self.customise_SITL_commandline(
["--defaults", ','.join(defaults), ],
[],
defaults_filepath=defaults,
model=model,
wipe=True,
)
@ -210,7 +211,8 @@ class AutoTestHelicopter(AutoTestCopter):
def governortest(self):
'''Test Heli Internal Throttle Curve and Governor'''
self.customise_SITL_commandline(
["--defaults", ','.join(self.model_defaults_filepath('heli-gas')), ],
[],
defaults_filepath=self.model_defaults_filepath('heli-gas'),
model="heli-gas",
wipe=True,
)

View File

@ -542,6 +542,9 @@ def start_SITL(binary,
cmd.extend(customisations)
if "--defaults" in customisations:
raise ValueError("--defaults must be passed in via defaults_filepath keyword argument, not as part of customisation list") # noqa
pexpect_logfile_prefix = stdout_prefix
if pexpect_logfile_prefix is None:
pexpect_logfile_prefix = os.path.basename(binary)