mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-01-11 18:38:28 -04:00
Tools: autotest: add test for SITL implementation of Block backend
This commit is contained in:
parent
2308f2b097
commit
bd713e0c87
@ -1951,6 +1951,10 @@ Brakes have negligible effect (with=%0.2fm without=%0.2fm delta=%0.2fm)
|
||||
"Test DataFlash over MAVLink",
|
||||
self.test_dataflash_over_mavlink),
|
||||
|
||||
("DataFlashSITL",
|
||||
"Test DataFlash SITL backend",
|
||||
self.test_dataflash_sitl),
|
||||
|
||||
("DownLoadLogs", "Download logs", lambda:
|
||||
self.log_download(
|
||||
self.buildlogs_path("APMrover2-log.bin"),
|
||||
|
@ -2463,6 +2463,30 @@ class AutoTest(ABC):
|
||||
if ex is not None:
|
||||
raise ex
|
||||
|
||||
def test_dataflash_sitl(self):
|
||||
self.context_push()
|
||||
ex = None
|
||||
try:
|
||||
self.set_parameter("LOG_BACKEND_TYPE", 5)
|
||||
self.reboot_sitl()
|
||||
self.drain_mav() # hopefully draining COMMAND_ACK from that failed arm
|
||||
self.mavproxy.send("module load log\n")
|
||||
# self.mavproxy.expect("Loaded module log\n")
|
||||
self.mavproxy.send("log erase\n")
|
||||
self.mavproxy.send("log list\n")
|
||||
self.mavproxy.expect("Log 1 numLogs 1 lastLog 1 size")
|
||||
self.reboot_sitl()
|
||||
self.mavproxy.send("log list\n")
|
||||
self.mavproxy.expect("Log 1 numLogs 2 lastLog 2 size")
|
||||
except Exception as e:
|
||||
self.progress("Exception (%s) caught" % str(e))
|
||||
ex = e
|
||||
self.mavproxy.send("module unload log\n")
|
||||
self.context_pop()
|
||||
self.reboot_sitl()
|
||||
if ex is not None:
|
||||
raise ex
|
||||
|
||||
def test_arm_feature(self):
|
||||
"""Common feature to test."""
|
||||
# TEST ARMING/DISARM
|
||||
|
Loading…
Reference in New Issue
Block a user