Skip to content

Commit

Permalink
autotest: ensure latest log is timestamped, small and not growing
Browse files Browse the repository at this point in the history
A fixed time this log is open for ensures we know what we are downloading.

We will not be keeping dataflash logs of the rest of this test after this PR as we leave LOG_DISARMED as it is.

Waiting for GPS ensures the file gets a timestamp, so MAVProxy's "log download latest" will return that log file.
  • Loading branch information
peterbarker committed Mar 12, 2024
1 parent a444004 commit 636383d
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion Tools/autotest/vehicle_test_suite.py
Original file line number Diff line number Diff line change
Expand Up @@ -4372,7 +4372,7 @@ def TestLogDownloadMAVProxyNetwork(self, upload_logs=False):
self.context_push()
self.set_parameters({
"NET_ENABLED": 1,
"LOG_DISARMED": 1,
"LOG_DISARMED": 0,
"LOG_DARM_RATEMAX": 1, # make small logs
# UDP client
"NET_P1_TYPE": 1,
Expand Down Expand Up @@ -4409,6 +4409,17 @@ def TestLogDownloadMAVProxyNetwork(self, upload_logs=False):
})
self.reboot_sitl()

# ensure the latest log file is very small:
self.context_push()
self.set_parameter('LOG_DISARMED', 1)
self.delay_sim_time(15)
self.progress(f"Current onboard log filepath {self.current_onboard_log_filepath()}")
self.context_pop()

# ensure that the autopilot has a timestamp on that file by
# now, or MAVProxy does not see it as the latest log:
self.wait_gps_fix_type_gte(3)

self.set_parameter('SIM_SPEEDUP', 1)

endpoints = [('UDPClient', ':16001') ,
Expand Down

0 comments on commit 636383d

Please sign in to comment.