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.
  • Loading branch information
peterbarker committed Mar 11, 2024
1 parent 8ed1b02 commit 11157e4
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 @@ -4411,6 +4411,17 @@ def TestLogDownloadMAVProxyNetwork(self, upload_logs=False):

self.set_parameter('SIM_SPEEDUP', 1)

# 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)

endpoints = [('UDPClient', ':16001') ,
('UDPServer', 'udpout:127.0.0.1:16002'),
('TCPClient', 'tcpin:0.0.0.0:16003'),
Expand Down

0 comments on commit 11157e4

Please sign in to comment.