Commit Graph

374 Commits

Author SHA1 Message Date
Samuel Tabor bde9ce10e3 autotest: Add wipe as argument. 2020-07-07 11:46:32 +10:00
Peter Barker 6c9d756f11 autotest: validate context nesting 2020-07-06 14:21:55 +10:00
yaapu 0cbff6ac66 Tools: autotest FRSkyPassThrough increased timeout to let the test complete 2020-07-02 21:53:06 +10:00
yaapu 75b621a09f Tools: autotest added frsky serial_protocol 4 and 10 testing against mavlink telemetry 2020-07-02 21:53:06 +10:00
Peter Barker 53b6d1a639 autotest: wait for heartbeat when opening connection
# need to wait for a heartbeat to arrive as then mavutil will
        # select the correct set of messages for us to receive in
        # self.mav.messages.  You can actually recieve messages with
        # recv_match and those will not be in self.mav.messages until
        # you do this!

Also, wait_heartbeat ignores heartbeats from e.g. MAVProxy
2020-07-01 14:38:21 +10:00
Peter Barker 3737c13784 autotest: allow message rates to be set by message name, not just ID
Simply for convenience.
2020-06-24 18:09:28 +10:00
Peter Barker cd1198bf49 autotest: drain mav before attempting to run a command
We're losing an arbitrary amount of data while getting the ACK, so it's
fine to lose whatever is in the buffer.
2020-06-24 18:09:28 +10:00
Peter Barker d0b97b89e7 autotest: add an assert_receive_message method 2020-06-24 18:09:28 +10:00
Peter Barker 77e5236278 autotest: drain mavlink queue to avoid failing on slow MISSION_COUNT
It was observed from a log of a failed CI test that the ACK from
clearing the rally items took 6 wallclock seconds to arrive.

We were not waiting for that ACK to arrive before sending the request
for the mission item count, but if it has taken more than six seconds
for the ACK to arrive it is reasonable to assume that MISSION_COUNT
could very well take more than the 10 seconds we allow for it.

If we drain the mav before sending the request for the mission count we
should remove any signficiant timing problem due to a backlog of mavlnk
messages, but the amount of traffic here is problematic.

Also drain in lots of other places where we might be spending way too
long parsing messages.
2020-06-11 20:53:50 +10:00
Peter Barker dc19dfaed8 autotest: fix several race conditions in RCOverride test 2020-06-11 08:30:32 +10:00
Peter Barker e207bbdf2a autotest: fix SYSTEM_TIME stream detection function
MAVProxy's output is read by autotest via pexpect.

SITL's output is read by MAVProxy.

If we don't read MAVProxy's stdout then it doesn't read SITL and
everything stops.

Also, since we need to drain pexpects as part of reboot, and applying
parameter files requires rebooting... we need to append the expect
objects to the global list before we apply parameter files.  So move
that call.
2020-06-10 22:00:01 +10:00
bugobliterator 0528daecd8 autotest: increase timeout for compass calibration 2020-06-08 07:25:51 +10:00
bugobliterator a5e9da337a Tools: autotest: fix FixedYawCalibration 2020-06-05 09:38:40 +10:00
Pierre Kancir 2c7fc65fbd Tools: common.py: add generic compass calibration test 2020-06-05 09:38:40 +10:00
Pierre Kancir b72a17533c Tools: common: add a method to try arming and wait a result 2020-06-05 09:38:40 +10:00
Pierre Kancir 59de90d97f Tools: common.py: make max_delta a paramter for verify_parameter_values 2020-06-05 09:38:40 +10:00
Peter Barker 6490a57179 autotest: move check_logs to be an AutoTest-class function
This makes the AutoTest instance cognizant of the binary log files it is creating.  This will be useful for checking the contents of the log files created.
2020-06-04 20:15:31 +10:00
Peter Barker c474edbfbc autotest: attempt to make parameter download more reliable
something is stopping parameters from being fetched.  Give it time to
clear.
2020-05-30 10:11:07 +10:00
Peter Barker b0916231b2 autotest: add tests for log download 2020-05-26 19:32:49 +10:00
Peter Barker 605672b631 autotest: round frsky altitude rather than truncate
Closes https://github.com/ArduPilot/ardupilot/issues/14431
2020-05-23 17:40:24 +10:00
Peter Barker 1f1383ab64 autotest: add quadplane test for qassist 2020-05-20 18:39:42 +10:00
Peter Barker f9c86bbfd0 autotest: ensure cached timestamp is up-to-date for run_cmd_get_ack
If a long-running process drains the mavlink stream rather than parsing
it then the cached timestamp can be very, very out-of-date.  When we
next receieve a timestamp, then, there can be a signficant change in
time when we weren't expecting it.

run_cmd_get_ack can't use get_sim_time() as it might swallow the ack it
is looking for.
2020-05-19 19:12:41 +10:00
Peter Barker b857002158 autotest: drain mav before checking EKF values
May be getting stale values from this function
2020-05-19 19:12:41 +10:00
Peter Barker d51d6752e5 autotest: drain mav before delay
We're seeing suspiciously low wall-clock delays.
2020-05-19 19:12:41 +10:00
Peter Barker dec615bfb5 autotest: drain SITL pexpect when waiting for parameter
This is important when rebooting as the ArduPilot process can block on
sending to stdout, which pexpect is reading from.  While rebooting we're
waiting for a parameter to be reset to a different value in this loop,
which could take quite some time.
2020-05-15 16:02:09 +10:00
Peter Barker f6b121ad87 autotest: add tests for logging 2020-05-15 16:02:09 +10:00
Peter Barker b312260be3 autotest: add timestamp to progress message 2020-05-05 11:09:43 +10:00
Peter Barker ebc781ba3a autotest: switch to looking for barometer update string for passthrough test
MAVProxy can fetch parameters using FTP rather than normal param
mechanism.  Currently this does not emit any of our statustext
information - like the text we're looking for in this test
2020-05-04 10:07:38 +10:00
Peter Barker 864717310d autotest: allow specification of EKF type to use on commandline 2020-04-24 13:37:47 +10:00
Peter Barker c6cf809041 autotest: correct some parsing-out-of-logging-message 2020-04-22 21:10:55 +10:00
Samuel Tabor 913e5a23fe autotest: Add method to get default params for model. 2020-04-22 10:01:09 +10:00
Samuel Tabor e30f0a9173 autotest: Move soaring test into plane. 2020-04-19 11:09:16 +10:00
Peter Barker efb5ad2f1c autotest: correct checking of downloaded file
First time we've tried to round-trip a mission file with comments it it

New frames used by new mission files need stuff to be ignored
2020-04-15 16:24:40 +10:00
Peter Barker 10e8f3f3d7 autotest: canonicalise on defaults_filepath rather than defaults_file
This naming better represents the fact this isn't just a filename.
2020-04-14 15:09:17 +10:00
Samuel Tabor c4e255fa5f autotest: Fix key error 2020-04-14 15:09:17 +10:00
Peter Barker 691ae58a79 Tools: rename APMrover2 to Rover 2020-04-14 09:50:34 +09:00
Peter Barker 9511fa59ec autotest: permit specification of frame as part of customing cmdline 2020-04-12 20:34:26 +10:00
Peter Barker e0380fc9be autotest: improve debug information for missing fields 2020-04-12 08:36:48 +10:00
Pierre Kancir 5b26df5780 Tools: put Mission files into right directories 2020-04-09 09:01:03 +10:00
Peter Barker 2d171d0cb4 autotest: add sanity check for duplicate labels in LogWrite calls 2020-04-08 11:17:41 +10:00
Samuel Tabor a4c5e12fac Tools: Make soaring test a subclass of plane test. 2020-04-08 09:11:54 +10:00
Peter Barker 52bb7760bc autotest: add debug for COMMAND_LONG commands 2020-04-06 10:07:26 +10:00
Peter Barker 53ced35f9d autotest: correct bytes decoding for Python3 in Logger documentation 2020-03-29 14:44:36 +11:00
Peter Barker b8dba9886f autotest: Python3 fixes for LTM tests 2020-03-29 10:00:08 +11:00
Pierre Kancir 2d65cbd884 Tools: Common : create generic wait_and_maintain function, upgrade all wait functions to use it 2020-03-27 22:13:52 +11:00
Peter Barker 6206cbd1fa autotest: add sanity checking for undocumented/overdocumented logger messages 2020-03-22 18:35:14 +11:00
Peter Barker e671a0912e autotest: logger_metadata: understand , in @LoggerMessage
This means multiple messages use exactly the same meaning in the fields

Also retain ordering of fields
2020-03-21 09:34:43 +11:00
Peter Barker 28c3ba32ae autotest: add test for AP_Logger documentation generation 2020-03-20 13:05:46 +11:00
Peter Barker 741d3e1435 autotest: make verify_parameter_values more verbose 2020-03-20 13:05:15 +11:00
Peter Barker 403950f61f autotest: add autotests for CPU failsafe 2020-03-20 12:19:21 +11:00