autotest: add test for FRAMStorage

This commit is contained in:
Peter Barker 2021-10-08 12:25:41 +11:00 committed by Peter Barker
parent 376e7d2a21
commit 00c6308b25

View File

@ -5698,6 +5698,28 @@ Brakes have negligible effect (with=%0.2fm without=%0.2fm delta=%0.2fm)
# make sure we're back at our original value:
self.assert_parameter_value("LOG_BITMASK", 1)
def FRAMStorage(self):
self.set_parameter("LOG_BITMASK", 1)
self.reboot_sitl()
self.customise_SITL_commandline([
"--set-storage-posix-enabled", "0",
"--set-storage-fram-enabled", "1",
])
# TODO: ensure w'ere actually taking stuff from flash storage:
# if self.get_parameter("LOG_BITMASK") == 1:
# raise NotAchievedException("not using flash storage?")
self.set_parameter("LOG_BITMASK", 2)
self.reboot_sitl()
self.assert_parameter_value("LOG_BITMASK", 2)
self.set_parameter("LOG_BITMASK", 3)
self.reboot_sitl()
self.assert_parameter_value("LOG_BITMASK", 3)
self.customise_SITL_commandline([])
# make sure we're back at our original value:
self.assert_parameter_value("LOG_BITMASK", 1)
def tests(self):
'''return list of all tests'''
ret = super(AutoTestRover, self).tests()
@ -5924,6 +5946,10 @@ Brakes have negligible effect (with=%0.2fm without=%0.2fm delta=%0.2fm)
"Test flash storage (for parameters etc)",
self.FlashStorage),
("FRAMStorage",
"Test FRAM storage (for parameters etc)",
self.FRAMStorage),
("LogUpload",
"Upload logs",
self.log_upload),