diff --git a/Tools/autotest/arduplane.py b/Tools/autotest/arduplane.py index 04cf0ef843..8992291bb7 100644 --- a/Tools/autotest/arduplane.py +++ b/Tools/autotest/arduplane.py @@ -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), diff --git a/Tools/autotest/common.py b/Tools/autotest/common.py index fa7cb14939..3aa33e742c 100644 --- a/Tools/autotest/common.py +++ b/Tools/autotest/common.py @@ -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",