autotest: add trivial test for MAVFTP using MAVProxy

This commit is contained in:
Peter Barker 2021-09-27 09:58:54 +10:00 committed by Peter Barker
parent 20a91dc1c8
commit bc664d77b7
2 changed files with 22 additions and 0 deletions

View File

@ -3298,6 +3298,10 @@ class AutoTestPlane(AutoTest):
"Switch to DCM mid-flight",
self.ForcedDCM),
("MAVFTP",
"Test MAVProxy can talk FTP to autopilot",
self.MAVFTP),
("LogUpload",
"Log upload",
self.log_upload),

View File

@ -10751,6 +10751,24 @@ switch value'''
if distance > 1:
raise NotAchievedException("gps type %u misbehaving" % name)
def MAVFTP(self):
'''ensure MAVProxy can do MAVFTP to ardupilot'''
mavproxy = self.start_mavproxy()
ex = None
try:
mavproxy.send("module load ftp\n")
mavproxy.expect(["Loaded module ftp", "module ftp already loaded"])
mavproxy.send("ftp list\n")
mavproxy.expect(" D libraries") # one line from the ftp list output
except Exception as e:
self.print_exception_caught(e)
ex = e
self.stop_mavproxy(mavproxy)
if ex is not None:
raise ex
def tests(self):
return [
Test("PIDTuning",