Commit Graph

829 Commits

Author SHA1 Message Date
Peter Barker
fdb5b5e6d6 autotest: correct dataflash transfer test for long periods
This came in with a 35 second delay, which is rather spectacular given
the 5 second loop it is in.

2021-01-11T11:54:30.3046835Z dataflash_logger status
2021-01-11T11:54:30.3047406Z MANUAL> DFLogger: Active Rate(35s):408.788kB/s Block:65034 Missing:0 Fixed:0 Abandoned:0
2021-01-11T11:54:30.3048195Z Timed out looking for Active Rate\([0-9]s\):([0-9]+[.][0-9]+)
2021-01-11T11:54:30.3048801Z AT-0472.3: Exception caught: 60
2021-01-13 12:24:17 +11:00
Peter Barker
3a264e0a76 autotest: use LOG_STRUCTURE_FROM as key string (don't need library name) 2021-01-12 17:44:24 +11:00
Josh Henderson
0052e4d528 Tools: auotest add LOG_STRUCTURE_FROM_AHRS 2021-01-12 10:13:22 +11:00
Peter Barker
4d19ff6b26 autotest: prompt ArduPilot for SYSTEM_TIME message during reboot
This helps us actually execute the timeouts appropriately and thus
re-fetch the STAT_BOOTCNT parameter we use for detecting the reboot

Eliminates annoying pauses during testing.
2021-01-09 16:20:12 +11:00
Peter Barker
5120ebf2f6 autotest: add a set_parameters method 2021-01-08 23:51:33 +11:00
Andy Piper
f702288ad2 autotest: correct number of logs 2021-01-02 22:30:08 +11:00
Peter Barker
38ea62c5d7 autotest: send mode change messages directly rather than via MAVProxy 2020-12-31 17:43:06 +11:00
Peter Barker
d31f676c33 autotest: don't use MAVProxy for uploading using fencepoint protocol 2020-12-31 17:42:50 +11:00
Peter Barker
2b06ae9aa0 autotest: create and use a wait_sensor_state method 2020-12-31 17:42:33 +11:00
Peter Barker
7c7fb67829 autotest: fixes for AFS test 2020-12-31 17:42:20 +11:00
Peter Barker
7f79ddf3ff autotest: CRSF: remove pointless wait-ready-to-arm 2020-12-31 17:42:06 +11:00
Peter Barker
6c48a38497 autotest: avoid zero-byte-read on log download 2020-12-31 17:39:53 +11:00
Peter Barker
b53b30ea51 autotest: split out a get_rc_channel_value() 2020-12-29 15:03:34 +11:00
Peter Barker
0a5eedb05a autotest: wipe and reinitialise parameters when resetting SITL commandline
Should fix this scenario:
 - Plane soaring test uses different defaults file
 - soaring test sets a parameter away from default value
 - context pop sets it back to the value in the defaults file
 - it is now in permanent storage with the default found in the
different defaults file used by the soaring test
 - we finish running the soaring test an reset the SITL command line
back to default, with the old defaults file
 - we go on to running the next test.  At this point the value for that
parameter is the default in the defaults file used by the soaring test.

Something similar applies in the Callisto test.
2020-12-25 12:18:01 +11:00
Peter Barker
0788b46374 autotest: add trivial test for Callisto 2020-12-25 12:18:01 +11:00
Peter Barker
5d23dc2314 autotest: avoid replicating enumeration value names from pymavlink 2020-12-24 00:22:52 +11:00
Pierre Kancir
06d6526ba6 Autotest: correct wait_distance_to_home comment 2020-12-24 00:22:52 +11:00
Pierre Kancir
6565309325 Autotest: add test_set_velocity_global_int tests 2020-12-24 00:22:52 +11:00
Pierre Kancir
10673122c0 Autotest: add test_set_position_global_int tests 2020-12-24 00:22:52 +11:00
Pierre Kancir
62a1fa1052 Autotest: add wait_speed_vector and wait yaw_speed functions 2020-12-24 00:22:52 +11:00
Pierre Kancir
0ca8e817d5 Autotest: wait_and_maintain add support of Vector3 2020-12-24 00:22:52 +11:00
Pierre Kancir
dbaeb668f1 Autotest: add MAV_FRAME dictionary 2020-12-24 00:22:52 +11:00
Pierre Kancir
0bf7bd7f68 Autotest: add set_position mask to common.py 2020-12-24 00:22:52 +11:00
Peter Barker
4efcf16005 autotest: correct number of bytes we expect to download
We request a fixed number of bytes, which could be more or  less than the
log file size.
2020-12-18 13:35:15 +11:00
Peter Barker
8e71e2505a autotest: correct lookup for most recent log file 2020-12-18 13:35:15 +11:00
Pierre Kancir
9550721ae4 Tools: add initial_mode testing 2020-12-16 17:27:07 +09:00
Peter Barker
9ad2961664 autotest: allow regex for matching wait_statustext 2020-12-11 07:35:02 +11:00
Peter Barker
cecdc798ca autotest: present strings for unexpected results in run_cmd_get_ack 2020-12-09 14:09:44 +11:00
Peter Barker
9207bd8a8a autotest: remove armability check from compass calibration test
The new prearm-checking code has shown that we're not actually armable
after all!

Even the new prearm bit won't tell you if you can arm - you have to arm
to test that!
2020-12-07 11:21:30 +11:00
Peter Barker
087300749c autotest: ensure we have position without being armable for compass cal check 2020-12-07 11:21:30 +11:00
Peter Barker
38e324f141 autotest: do not check prearm bit in dataflash-over-mavlink
We won't be armable - but the other checks we make will ensure we get
the error we are looking for

Also use a more reliable way of draining the data from the autopilot
2020-12-07 11:21:30 +11:00
Peter Barker
5707d8ecc0 autotest: check new MAV_SYS_STATUS_PREARM_CHECK in wait_ready_to_arm 2020-12-07 11:21:30 +11:00
Peter Barker
17f806cdb9 autotest: add test for execution of button-bound functions 2020-12-01 10:06:57 +11:00
Peter Barker
12f001066b autotest: split out a wait_armed function 2020-12-01 10:06:57 +11:00
Peter Barker
3f6b398a01 autotest: include EK2,EK3 and DAL LogStructures in code-defined messages 2020-11-24 15:33:37 +11:00
Peter Barker
29b913cd41 autotest: avoid using undefined fmt variable 2020-11-12 21:00:04 +11:00
Peter Barker
58bdae1b52 autotest: get Valgrind closer-to-working
This gets us past the reboot problem for the most part, where Valgrind doesn't like you exec'ing
2020-11-11 18:22:58 +11:00
Andrew Tridgell
403275beea autotest: added RBOH message 2020-11-10 16:15:45 +11:00
Andrew Tridgell
4a06641048 autotest: added RWOH message 2020-11-10 16:15:45 +11:00
Andrew Tridgell
7f0113b82d autotest: added REPH and REVH 2020-11-10 16:15:45 +11:00
Andrew Tridgell
ef5baaf482 autotest: added ROFH msg 2020-11-10 16:15:45 +11:00
Andrew Tridgell
8ba067608b autotest: cope with LogStructure.h in multiple places
and allow for no docs in replay msgs
2020-11-10 16:15:45 +11:00
Andrew Tridgell
161f2a8d2f autotest: improved error msg for missing doc fields
Co-authored-by: Peter Barker <pbarker@barker.dropbear.id.au>
2020-11-10 16:15:45 +11:00
bugobliterator
c72c96fa9c Tools: setup CI test for CANBus 2020-11-04 19:59:40 +11:00
Peter Barker
18330d16de autotest: add test for MAVlite 2020-10-27 10:17:53 +11:00
Buzz
586e9f80d5 AutoTest: break copter autotests into smaller "under 10 minute" chunks to speedup github actions CI 2020-10-21 18:01:47 +11:00
Peter Barker
937d7bf335 autotest: add quiet option to drain_mav 2020-10-15 16:31:41 +11:00
Peter Barker
49fd762f26 autotest: fix and re-enable button test
A recent commit to fix the setting-of-pullup-resistors in SITL makes it
possible to re-enable this.

Closes #15259
2020-10-15 08:34:08 +11:00
Peter Barker
8f1e9ebc7f autotest: reset camera feedback rate if exception is raised 2020-10-12 13:48:15 +11:00
Peter Barker
d13f6acc66 autotest: quieten mav draining 2020-10-08 17:21:35 +09:00
Peter Barker
1d0735f206 autotest: add a poll_message method 2020-10-07 11:54:02 +11:00
Peter Barker
669622c614 autotest: improve use of SITL-is-running
ATM if the SITL binary dies we don't catch it anywhere.  This might
become part of the solution for that, as well as some changes on
run_one_test.
2020-09-22 21:11:57 +10:00
Peter Barker
1075e13352 autotest: stop set_parameter from using get_parameter
Setting a parameter on ArduPilot causes the autopilot to emit the new
value in a PARAM_VALUE message, so we do not need to fetch it ourselves.

Fetching it ourselves causes subtle problems for the autotest suite
where a PARAM_VALUE is currently in the uart buffer - so the autotest
set_parameter has consumed one PARAM_VALUE message (the auto-emitted
one).  If it immediately does a set_parameter then the next
PARAM_VALUE it sees will be the OLD value as the value comes out of the
uart.
2020-09-15 19:27:36 +10:00
Peter Barker
3e882fcad8 autotest: loosen mag-percent-complete threshold to 95%
So 98% wasn't loose enough...
2020-09-11 15:31:45 +10:00
Peter Barker
0f5f040380 autotest: send all progress messages to autopilot
These will be logged into dataflash and into the telemetry log
2020-09-09 23:47:28 +10:00
bugobliterator
d997ca8779 autotest: pass calibration test even if 98% complete before success 2020-09-09 23:46:23 +10:00
Peter Barker
51b54d3740 autotest: avoid leaving message hooks around
Can lead to some very weird and confusing output
2020-09-09 17:59:17 +10:00
Peter Barker
9228f47dc9 autotest: create collections-on-context to record selected messages 2020-09-08 14:19:08 +10:00
Peter Barker
f3866e5f39 autotest: disable button test 2020-09-08 12:31:15 +10:00
Andrew Tridgell
7c5a0a6a43 Tools: disable LOG_REPLAY by default in autotest
LOG_REPLAY prevents us logging when we have sensor failures, which
makes many tests hard to debug
2020-09-08 11:01:14 +10:00
Peter Barker
65268ee3d4 autotest: more button-test fixes 2020-09-06 16:49:16 +10:00
bugobliterator
6203e0685e autotest: disable MAG orientation test 2020-09-06 11:21:28 +10:00
Andy Piper
0b9d9fc284 autotest: use StringIO correctly 2020-09-06 09:12:59 +10:00
Andy Piper
6ebc7622fe autotest: comprehensive dataflash test 2020-09-05 10:20:39 +10:00
Peter Barker
2ea41b7997 autotest: spit out actual simulated mag orientations as part of debug 2020-09-03 13:08:07 +10:00
Peter Barker
5a8b1639d0 autotest: fix nmea output test 2020-09-02 10:05:26 +10:00
Peter Barker
23ba2002e8 autotest: dump final mag cal report verbosely 2020-09-01 14:11:57 +10:00
Peter Barker
74c47827d9 autotest: drain stdout of SITL binary
The new rate messages were filling up the stdout buffer, causing the
process to block....
2020-08-30 08:38:35 +10:00
Peter Barker
397e134106 autotest: quieten RTL 2020-08-30 08:38:35 +10:00
Peter Barker
065d03dd30 autotest: add a timeout in the button test 2020-08-30 08:38:35 +10:00
Peter Barker
c01b26ca62 autotest: fix race condition in EKF type 10
EKF type 10 is always able to give you a position - but the arming
checks require you to have a good GPS position, and that's something
else again.
2020-08-30 08:38:35 +10:00
Peter Barker
43cdceba8f autotest: tweak wait_ready_to_arm 2020-08-30 08:38:35 +10:00
Peter Barker
b7641345e1 autotest: set and get parameters directly using mavlink message 2020-08-30 08:38:35 +10:00
Pierre Kancir
936511a720 Autotest: common: correct some text format 2020-08-29 10:44:19 +10:00
Pierre Kancir
5b72de25e0 Autotest: update wait_distance_to_home
Autotest: copter: allow to pass min_distance for RTL

Autotest: rover: allow to pass min distance for RTL
2020-08-29 10:44:19 +10:00
Pierre Kancir
16b499d0f6 Autotest: allow to select which GPS flags we want to wait for 2020-08-27 09:11:13 +10:00
Peter Barker
80bee19bc9 autotest: correct race condition in button test
A BUTTON_CHANGE may have been emitted after we send the parameter but before it is processed by the autopilot
2020-08-26 13:22:14 +10:00
Pierre Kancir
a181fcf8a2 Autotest: common: put generated parameter and LogMessage files into buildlogs directory 2020-08-25 20:01:27 +10:00
Peter Barker
a523868b33 autotest: fix Beacon test 2020-08-25 17:21:50 +10:00
Peter Barker
69d246d63e autotest: add test for priority-based compass reordering 2020-08-25 08:30:04 +10:00
Peter Barker
bb697dd4b9 autotest: avoid using mavproxy for testing message intervals 2020-08-24 19:33:37 +10:00
Peter Barker
00bfe04539 autotest: remove duplicate recovery code from set-message-interval test 2020-08-24 14:00:38 +10:00
Peter Barker
03d0eda7f1 autotest: use a passthrough progress function for Telem objects 2020-08-24 13:24:41 +10:00
Pierre Kancir
8b92af732a Autotest: common: add wait_heartbeat to change_mode to clean up msg and give time to status to update 2020-08-21 13:35:51 +10:00
Peter Barker
cddb5fb1cc autotest: use message hook when waiting for statustext
Eliminates a race condition when waiting for statustexts.  Getting the
current sim time slurps messages.
2020-08-21 12:26:12 +10:00
Pierre Kancir
b7f46462f8 Autotest: common: reduce timeout on ArmFeature test
This is unnessary to wait for 60s for failure, 15s is enough
2020-08-21 09:13:32 +10:00
Pierre Kancir
acc4a1db3f Autotest: remove special case for vicon and default vicon for copter to false 2020-08-17 21:17:26 +10:00
Peter Barker
82dd7ece6c autotest: fix frsky bitop on float issue
Crops up in Python 3.8:

    gpi_lat = self.tf_encode_gps_latitude(gpi.lat)
  File "/home/pbarker/rc/ardupilot/Tools/autotest/common.py", line 6183, in tf_encode_gps_latitude
    value = ((abs(lat)/100)*6) | 0x40000000
TypeError: unsupported operand type(s) for |: 'float' and 'int'
2020-08-15 10:42:47 +10:00
Pierre Kancir
388fef23d9 Autotest: common: remove use of some raw mavproxy cmd for rc 2020-08-15 09:16:24 +10:00
Pierre Kancir
30fa433faa Tools: don't add duplicate param to context 2020-08-14 18:16:47 +10:00
Mark Whitehorn
d0ff26e782 autotest: expand quadplane AirMode autotest 2020-08-13 08:47:27 +10:00
Peter Barker
b9dc7118d4 autotest: add do_timesync_roundtrip to do a timesync against SITL
On the assumption that ArduPilot processes mavlink packets
synchronously (or at least in order), after we have run a timesync
roundtrip we can reasonably expect any mavlink command we have sent
prior to the roundtrip to have been processed, and we should be able to
see the results in the mavlink stream.
2020-08-05 13:24:15 +10:00
Peter Barker
4640c24872 autotest: correct checking for no-logs string 2020-08-04 15:12:08 +10:00
Peter Barker
b2748f19f6 autotest: correct validator for Distance wait-and-maintain 2020-08-04 15:12:08 +10:00
Willian Galvani
0f992ac6a3 Autotest: add test for Sub position hold 2020-08-03 20:19:28 -07:00
Peter Barker
66ffb4a17b autotest: retry parameter fetch in MIS_TOTAL test
There's a race condition with MAVProxy; it's fetching parameters here
and seems to ignore our requests.

Also correct named parameter from retry to attempts
2020-07-24 09:38:39 +10:00
Peter Barker
ccff006517 autotest: correct time-spent-waiting-to-arm for zero case 2020-07-23 18:10:06 +10:00
Peter Barker
f1fc61cb41 autotest: improve compass test diagnostics 2020-07-23 15:11:11 +10:00
Peter Barker
b69130d352 autotest: require uptime of 5s before declaring GPS definitely not present
Until we detect a GPS we mark it as "not present", even if the
parameters say that there should be one present.
2020-07-23 11:17:42 +10:00
Peter Barker
3b0524a7e1 autotest: add diagnostics to frsky passthrough test 2020-07-21 11:26:52 +10:00
Peter Barker
4acb66cd13 autotest: correct check of frsky home-relative altitude
GLOBAL_POSITION_INT.relative_alt is in mm
2020-07-20 13:31:17 +10:00
Peter Barker
ac827cf45b autotest: allow much more time for frsky test to finish
parameters don't seem to come down very fast at all
2020-07-20 13:31:17 +10:00
Peter Barker
a49580e0af autotest: improve debug on frsky tests 2020-07-20 13:31:17 +10:00
Peter Barker
d9aa334489 autotest: ensure cached sim time moves forward in frsky test 2020-07-20 13:31:17 +10:00
Peter Barker
6eb1d289b8 autotest: add trivial test for CRSF in copter 2020-07-07 18:48:06 +10:00
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
Peter Barker
92d2186b95 autotest: don't use self.mav.motors_disarmed_wait as it blocks forever 2020-03-17 16:31:29 +11:00
Peter Barker
7038d522b8 autotest: run GetCapabilities test on all vehicles 2020-03-03 09:44:39 +11:00
Peter Barker
cb8d623624 autotest: add test for fixed yaw calibration 2020-02-29 16:25:30 +11:00
Peter Barker
82f53abee2 autotest: restore fly.ArduCopter as running all tests
the test list for ArduCopter is made up of those from tests1 and tests2
2020-02-22 16:51:39 +11:00
Pierre Kancir
e1d8148cc0 autotest: Python correctness fixes
Tools: common: correct copy shadowing in set_rc_from_map

Tools: common: comment out unused code

Tools: common: remove iteritem usage for py3

Tools: common: remove duplicate key in FRSkySPort id description for GPS

Tools: rover: correct type shadowing

Tools: rover: make expected_distance_epsilon float

Tools: rover: comment out unused code

Tools: rover: correct variable shadowing on my_message_hook

Tools: copter: correct variable shadowing

Tools: common: use Bool for port.setblocking

Tools: common: fix variable shadowing
2020-02-22 10:37:29 +11:00
Peter Barker
b2d05c9a85 autotest: make download_parameters more robust 2020-02-19 15:09:16 +11:00
Peter Barker
e3e152ae3e autotest: make all-parameter-documentation-working a full autotest 2020-02-19 15:09:16 +11:00
Peter Barker
a86dc33235 autotest: improve debugging of original location discrepancy 2020-02-18 12:29:00 +11:00
Peter Barker
14ad9a58bd autotest: don't blat main test exception with still-armed exception 2020-02-14 16:36:12 +11:00
Peter Barker
fa33719da6 autotest: improve distance-from-home debug 2020-02-14 16:36:12 +11:00
Peter Barker
6843d0e628 autotest: improve debug on parameter download failure 2020-02-13 21:31:20 +11:00
Peter Barker
be7ae6fbc9 autotest: add --validate-parameters autotest option
After each reboot, the complete list of parameters is downloaded and
checked against parameter documentation generated from the source code.
2020-02-13 21:31:20 +11:00
Yaapu
b0e5bfc32d autotest:FRSkySPort: added support for VARIO 0x30 and GPS 0x800 sensor types
This adds support for the VARIO sensor 0x30 and GPS sensor 0x800 to the autotest suite
2020-02-09 20:52:58 +11:00
Peter Barker
fd8088f1e5 autotest: add Copter tests for altitude change on arm 2020-02-08 11:06:03 +11:00
Peter Barker
ac904085d6 autotest: add statistics on time taken to arm 2020-02-08 11:06:03 +11:00
Peter Barker
b0aceaea70 autotest: add tests for LTM telemetry output 2020-02-08 10:38:34 +11:00
Peter Barker
62f289b8e6 autotest: drain_mav_unparsed gets a quiet option 2020-02-08 10:38:34 +11:00
Peter Barker
b75dd36f71 autotest: create Telem baseclass for telem clients 2020-02-08 10:38:34 +11:00
Peter Barker
212bc6538b autotest: improve output on wait_altitude 2020-02-07 15:02:35 +11:00
Peter Barker
441f43103a autotest: add send_debug_trap to send a mavlink trap to the autopilot 2020-01-29 10:27:01 +11:00
Peter Barker
53ce463a90 autotest: add test for statustext coming through via frsky passthrough 2020-01-28 15:16:58 +11:00
Peter Barker
e7ca2057ce autotest: improve output from wait_altitude 2020-01-25 14:26:13 +11:00
Peter Barker
375f642759 autotest: fix race condition in test for AFS on Plane
Only showed up when running under Valgrind, this was a simple race condition.
2020-01-19 09:03:54 +11:00
Peter Barker
91b01a3eb2 autotest: fix integer vs float issues for Python3 2020-01-18 12:52:31 +11:00
Peter Barker
e568f74580 autotest: correct string-vs-float issue in dataflashovermavlink test 2020-01-18 09:09:18 +11:00
Peter Barker
3d0ede499b autotest: disable parameters test on Tracker until reboot works 2020-01-16 21:19:01 +11:00
Peter Barker
f42c42df02 autotest: Python3 fixes for Frsky tests 2020-01-15 22:00:51 +11:00
Peter Barker
9192cb7b41 autotest: add tests for parameter download 2020-01-15 13:54:23 +11:00
Andy Piper
d6248ce57a Tools: correct math in frsky passthrough test 2020-01-15 13:53:52 +11:00
Peter Barker
56fb9f8198 autotest: add test for existence of arming log messages 2020-01-14 11:39:36 +11:00
Peter Barker
ba13f0bb29 autotest: add test for Frsky SPort 2020-01-13 16:03:12 +11:00
Peter Barker
280a44fc73 autotest: make nmea-output test more reliable 2020-01-13 16:01:23 +11:00
Peter Barker
cefd991fb0 autotest: add test for frsky passthrough 2020-01-11 22:43:36 +11:00
Peter Barker
1cfb4e4a49 autotest: test FRSky serial output by taking output via TCP 2020-01-09 12:24:11 +11:00
Peter Barker
a919e8fd45 autotest: adjust NMEAOutput test to take into account NMEA GPS update lag 2020-01-05 10:49:17 +11:00
Peter Barker
e080493a7c autotest: add test for accelerometer pose calibration 2020-01-01 13:06:28 +11:00
Peter Barker
19c02471cf Tools: autotest: add test for NMEA output 2019-12-23 11:19:59 +11:00
Andy Piper
39e948a40a Tools: add motor vibration test and support for post-test fft
perform FFT analysis on vibration output
2019-12-17 10:07:06 +11:00
Peter Barker
516219533d autotest: prompt MAVProxy to do streamrate stuff after restarting SITL 2019-12-11 19:49:20 +11:00
Peter Barker
91c6a8c1d8 autotest: fix set_streamrate with rate of -1 2019-12-11 19:49:20 +11:00
Peter Barker
5b45931728 autotest: test buttons on Plane and Copter as well as Rover 2019-12-10 09:29:52 +09:00
Andrew Tridgell
d7018a2ba0 Tools: switch to https URL for firmware 2019-12-08 07:44:14 +11:00
Peter Barker
96b9c8f59a autotest: wait a long time for RC to restart after restarting SITL binary
May help fix the "no RC" failures we're seeing in CI
2019-12-05 22:41:30 +11:00
Peter Barker
5e4162b997 autotest: unload MAVProxy module log after use 2019-12-04 16:08:15 +11:00
Peter Barker
fecca9a559 autotest: add tests for serial RangeFinder drivers 2019-12-03 09:07:09 +11:00
Peter Barker
ece59f8233 autotest: replace wait_seconds with delay_sim_time
These did exactly the same thing
2019-11-08 19:49:46 +11:00
Mark Whitehorn
6b9c997a97 Tools: rename SensorConfigErrorLoop test to ConfigErrorLoop 2019-11-08 10:14:34 +11:00
Peter Barker
7dda87fd44 autotest: assert ArduPilot announces compass cal capability 2019-11-05 11:26:23 +11:00
Peter Barker
7842d07b12 autotest: add test for scripting 2019-10-24 13:50:51 +11:00
Peter Barker
8785ff7a14 autotest: make polyfence avoidance test more reliable
Amusingly, at faster speedups the car made a decision to turn North
rather than South which it does when at lower speedups.

Gave it no choice in the matter.
2019-10-15 23:14:31 +11:00
Peter Barker
d2cf0939a5 autotest: drain mav before attempting disarm
If the queue of messages for us to parse is very long then we can time
out before managing to parse them all and find the disarm!
2019-10-15 15:26:10 +09:00
Peter Barker
03c68f991c autotest: raise exception if no simulated time available
Sucking the mavlink message queue dry unexpectedly is worse than any
tests being broken and failing with a clear error.
2019-10-15 15:26:10 +09:00
Peter Barker
6e88982b39 autotest: fix mission-load dedupe issue
There are other ways we can receive Flight Plan received now, and
MAVProxy's statustext dedupe stuff was biting us
2019-10-15 14:03:28 +11:00
Andrew Tridgell
3f9999d932 autotest: fixed MISSION_ITEM_INT receive to be reliable
use a condition in recv_match() to ensure we don't mix up msgs from
other protocols
2019-10-09 19:56:51 +11:00
Peter Barker
23983d03b5 Tools: autotest: correct get_distance_int 2019-10-05 06:53:52 +10:00
Peter Barker
be8632668b autotest: make dataflash-over-mavlink test more accomodating
Saw <100kB/s on autotest server, so can't look for minimum 100kB/s.

Also fixed disarmed-at-end-of-test
2019-10-04 10:38:32 +10:00
Peter Barker
c5f52a8355 Tools: autotest: tests for new fence code
Tools: autotest: move clear_mission up, use it before running each test

Also have it understand MAV_MISSION_TYPE_ALL

Tools: autotest: add tests for polyfence

Tools: autotest: add tests for multiple inclusion polyfences

Tools: autotest: ensure we can't arm inside a circle exclusion zone

Tools: autotest: add test for arming outside an inclusion zone

Tools: autotest: add tests for upload timeout

Tools: autotest: add tests for not arming due to polygon zones

Tools: autotest: add test for fence point reboot survivability

Tools: autotest: add test for moving fence point

Tools: autotest: add some tests via MAVProxy

Tools: autotest: add test for avoiding polygonal exclusion zones

Tools: autotest: add test for object avoidance

Currently disabled as it doesn't pass where it seemingly should.

Tools: autotest: skip MAVProxy tests on older MAVProxy versions

Tools: autotest: adjust fence loading for lack of string back from MAVProxy

Tools: autotest: create a do_RTL function

Tools: autotest: cope with loading QGC-style fence files

Tools: autotest: add test for object-avoidance in guided mode

Tools: autotest: add OA test for auto mode

Tools: autotest: add test for bendy ruler in guided mode

Tools: autotest: adjust for new MAVProxy fence module not emitting old strings

Tools: autotest: add tests for prearming due to bad parameter values
2019-09-28 07:58:48 +09:00
Peter Barker
2e2bbf57bf Tools: autotest: add disarm_wait function 2019-09-26 15:19:10 +10:00
Andy Piper
5f34ec6578 Tools: support lldb debugging for sim_vehicle and autotest 2019-09-26 09:02:11 +10:00
Peter Barker
b97b41a6e8 Tools: autotest: allow tracker to be armed between tests 2019-09-25 14:57:02 +10:00
Peter Barker
4c40640238 Tools: autotest: tidy handling of armed-at-end-of-test handling 2019-09-25 14:57:02 +10:00
Peter Barker
f27b8a6c02 Tools: autotest: test for vehicle armed after test passes
postcondition of any test is that it leaves the vehicle disarmed
2019-09-24 20:00:07 +10:00
Peter Barker
642935fd43 Tools: random Python cleanups based on lgtm analysis 2019-09-21 22:26:03 +10:00
Peter Barker
f3eaf9ee6e Tools: autotest: more coverage out of the dataflash-over-mavlink tests 2019-09-19 08:46:55 +10:00
Peter Barker
1f25b6e406 Tools: autotest: add test for SITL implementation of Block backend 2019-09-18 17:42:18 +10:00
Ebin
38c9763d48 Autotest: GPS disable test skipped when AHRS_EKF_TYPE is 10 2019-09-18 07:07:08 +10:00
Peter Barker
bba019abc2 Tools: autotest: add basic tests for AP_AdvancedFailsafe 2019-09-17 09:13:43 +10:00
Peter Barker
36ba3a6e4c Tools: autotest: add test for follow mode 2019-09-16 12:00:11 +10:00
Peter Barker
4a35e8ee74 Tools: autotest: skip MIS_TOTAL parameter test on Tracker
This is CMD_TOTAL not MIS_TOTAL, and doesn't have facility for flags.
2019-09-14 09:26:11 +10:00
Peter Barker
da2e00dd6f Tools: autotest: fix race conditions in arm_vehicle and disarm_vehicle 2019-09-09 11:06:07 +10:00
Peter Barker
ba3f95ad20 Tools: autotest: add timeout parameter to detect_and_handle_reboot 2019-09-07 17:19:22 +10:00
Peter Barker
108f37c67c Tools: autotest: ensure we can set parameters in groups with internal flag set 2019-08-30 06:57:30 +10:00
Peter Barker
cce85cb418 Tools: autotest: add test for inability to set MIS_TOTAL 2019-08-22 09:23:56 +10:00
Peter Barker
a8a5ccf51b Tools: autotest: test that long fs triggers even if short fs disabled 2019-08-15 12:07:30 +10:00
Peter Barker
b61bfd663f Tools: autotest: wait for EKF to be happy after returning its GPS 2019-08-12 13:12:11 +10:00
Peter Barker
bf0a947317 Tools: autotest: improve test diagnostics 2019-08-08 08:35:52 +10:00
Peter Barker
4b331419e3 Tools: autotest: improve mission download diagnostics 2019-08-07 14:15:47 +10:00
Peter Barker
9aa5cedd2a Tools: autotest: increase timeout on mission_item_int
We may spend so much time parsing messages this deadline passes
2019-08-07 12:29:14 +10:00
Peter Barker
05a48928f8 Tools: autotest: assume Tracker has AP_Stats 2019-08-07 07:57:46 +09:00
Peter Barker
f896af6800 Tools: autotest: increase timeout waiting for MISSION_COUNT 2019-08-06 18:15:26 +10:00
Peter Barker
acf6cb8d75 Tools: autotest: rename clear_mission to clear_mission_using_mavproxy 2019-08-06 17:05:57 +10:00
Peter Barker
12b9928a56 Tools: autotest: break out a load_fence function 2019-08-05 16:37:08 +10:00
Peter Barker
1fbd41e6f3 Tools: autotest: add test for Rover SmartRTL 2019-07-23 19:00:38 +10:00
Pierre Kancir
666e7b88d7 Tools: common: dynamicly load and unload log module as needed 2019-07-16 18:58:54 +10:00
Pierre Kancir
b655197c95 Tools: common: unload dataflash_logger module after use 2019-07-16 18:58:54 +10:00
Pierre Kancir
98d897e790 Tools: common: implement do_set_relay and do_set_relay_mavproxy 2019-07-16 18:58:54 +10:00
Peter Barker
bd50f288a1 Tools: autotest: get mavproxy to heartbeat at speedup rate
This should resolve a race condition we have with guided position modes.

MAVProxy's heartbeat rate defaults to 1Hz.

When GCS failsafe is active on Copter because we're in GUIDED (or
GUIDED_NOGPS mode) we require a heartbeat every 5 seconds.  At speedup
8, we can only expect a heartbeat every 8 seconds of sim time.

We also only check for this heartbeat every 3 seconds - leading to this
awesome race condition.
2019-07-12 12:48:05 +10:00
Peter Barker
87e43d6e44 Tools: autotest: add option to disable breakpoints at sim startup 2019-07-12 12:48:05 +10:00
Pierre Kancir
12cb09a3f4 Tools: factorize sitl rangefinder setup 2019-07-11 11:52:44 +10:00
Pierre Kancir
daaf769055 Tools: add arm/disarm testing on all modes 2019-07-11 11:42:45 +10:00
Pierre Kancir
9850d1afec Tools: update with flake8
W605 invalid escape sequence '\s'
F402 import 'time' from line 10 shadowed by loop variable
E101 indentation contains mixed spaces and tabs
E703 statement ends with a semicolon
2019-07-09 12:46:39 +10:00
Peter Barker
899db3d3ac Tools: autotest: add test for sensor config error loop
Tools: autotest: exempt failing vehicles from SensorConfigError test
2019-07-09 10:01:23 +10:00
Peter Barker
6332d2e729 Tools: autotest: fix race condition with getting parameters 2019-07-08 16:51:25 +10:00
SergeyBokhantsev
c9447776b2 Tools: autotest: correct debounce tests under Rover
Channel 8 is the mode channel under Rover
2019-07-04 11:35:05 +10:00
Peter Barker
98cb68157f Tools: autotest: add a test for Copter surface tracking 2019-06-21 13:50:55 +10:00
Peter Barker
5992cc8782 Tools: autotest: clear mission between tests 2019-06-20 11:51:13 +10:00
Peter Barker
d8278335a1 Tools: autotest: move upload_using_mission_protocol up to common.py 2019-06-07 16:29:37 +10:00
Peter Barker
c8a4af76fe Tools: autotest: add tests for Plane fence 2019-06-07 16:29:37 +10:00
Peter Barker
6047ef105e Tools: autotest: correct text MAVProxy-dedupe check in mission load
This failed to protect against multiple rapid calls to load_mission
2019-06-06 10:33:28 +10:00
Peter Barker
e9552ec4e1 Tools: autotest: more efficient set_rc_from_map 2019-06-02 10:02:24 +10:00
Peter Barker
3ed55ea3c5 Tools: autotest: add drain_mav_unparsed and use it 2019-05-28 20:41:56 +10:00
Peter Barker
8d90b09829 Tools: autotest: add tests for upload/download rally using mission protocol
Tools: autotest: add tests for mission clearing

Tools: autotest: add tests for out-of-range mission counts

Tools: autotest: add test for Plane DO_CHANGE_SPEED
2019-05-22 08:53:45 +10:00
Francisco Ferreira
4f153f06b3
Tools: autotest: increase timeout for arming param check 2019-05-15 22:44:22 +01:00
Francisco Ferreira
e95d603a73
Tools: autotest: parse all heartbeats when looking for mode change 2019-05-15 22:44:22 +01:00
Peter Barker
d76894d883 Tools: autotest: drain mav before getting message rates, improve debug 2019-05-09 19:53:53 +10:00
Peter Barker
a2105e1f81 Tools: autotest: correct statustext sending under Python3 2019-05-02 13:15:37 +10:00
Peter Barker
18391d8a9a Tools: autotest: produce stacktraces under Python3 2019-05-02 13:15:37 +10:00
Peter Barker
4a237af093 Tools: autotest: ensure reboot if dataflash-over-mavlink test fails
Will stop cascading failures from occuring
2019-04-30 19:19:58 +10:00
Peter Barker
0cd5d66e3a Tools: autotest: increase epsilon
our round-trips etc cost precision
2019-04-23 10:06:17 +10:00
Peter Barker
2cb69366c8 Tools: autotest: facilitate changing mode by number 2019-04-19 07:51:49 +09:00
Peter Barker
5e69758661 Tools: autotest: factor out a start_mavproxy method 2019-04-16 21:10:22 +10:00
Peter Barker
b2acd15a55 Tools: autotest: encode string to bytes before passing to statustext_send 2019-04-15 18:40:01 +10:00
Peter Barker
b7eca63073 Tools: autotest: send statustext with test name to autopilot
This gets logged into the dataflash so you can quickly find relevant
logs
2019-04-14 07:56:39 +10:00
Peter Barker
696de42eea Tools: autotest: check we're seeing PL messages in the log during
precland
2019-04-04 11:54:58 +11:00
Peter Barker
4eaee039f0 Tools: autotest: avoid touch RC*_OPTION on sub 2019-03-30 12:01:49 +11:00
Peter Barker
6f52fa5622 Tools: autotest: do not set ARMING_RUDDER on sub and tracker 2019-03-29 19:07:18 +11:00
Peter Barker
ffccd6f263 Tools: autotest: stop using mav.location() for Tracker test
Turns out that since we don't stream vfr_hud mav.location won't ever
work
2019-03-29 07:40:45 +11:00
Peter Barker
9a16b40a73 Tools: autotest: rename get_rudder_channel to get_stick_arming_channel
... as some of these aren't actually rudder inputs...
2019-03-27 11:29:53 +11:00
Peter Barker
265d8d62cd Tools: autotest: add timeout to wait_ekf_flags waiting for EKF_STATUS_REPORT 2019-03-26 20:55:32 +11:00
Peter Barker
6fe7db2f43 Tools: autotest: add test for REQUEST_MESSAGE 2019-03-26 16:20:50 +11:00
Peter Barker
c6b8335392 Tools: autotest: improve debug for lack of mode map 2019-03-25 16:57:41 +11:00
Peter Barker
16476332b2 Tools: autotest: fix no-gps switch-to-location test 2019-03-22 08:19:42 +11:00
Peter Barker
1e2cf4bb60 Tools: autotest: fix sethome test under Python3 2019-03-22 08:19:11 +11:00
Peter Barker
935840ebb0 Tools: autotest: add test for setting home to current location 2019-03-19 19:56:13 +11:00
Peter Barker
6bf600c587 Tools: autotest: cope with being unable to reboot while armed 2019-03-19 10:53:37 +11:00
Peter Barker
873096f791 Tools: autotest: add test for Rover offboard-in-auto function 2019-03-15 14:51:35 +09:00
Peter Barker
9ca2c9d692 Tools: autotest: python3 fixes
Tools: autotest: use inbuilt zip on Python3
2019-03-13 20:26:24 +11:00
Peter Barker
841c222a12 Tools: autotest: add check that GPS is good before arming 2019-03-13 17:13:10 +11:00
Peter Barker
0aeb6c0e26 Tools: autotest: ensure initial home position is similar to sitl start pos 2019-03-13 13:20:29 +11:00
Peter Barker
d53f787a14 Tools: factor init up into parent class
Tools: autotest: use speedup 8 for all suites

for reliability
2019-03-13 08:20:20 +11:00
Peter Barker
844999c458 Tools: autotest: get accuracy before doing RTL
It can take a very long time to get our parameter value, so get it while
we're NOT moving away from the RTL location!
2019-03-13 08:20:20 +11:00
Peter Barker
65d0443c26 Tools: autotest: drain mav either side of initialising-after-reboot 2019-03-12 12:15:39 +11:00
Peter Barker
f71f100d6a Tools: autotest: make drain_mav truly drain the mavlink connection 2019-03-12 12:15:39 +11:00
Peter Barker
b47b97a981 Tools: autotest: add test for QuadPlane controller pre-arm checks 2019-03-12 10:14:14 +11:00
Peter Barker
28e27b4120 Tools: autotest: improve test reliability
Also remove redundant reset code

Tools: autotest: drain mav and all pexexpects before running each test

Tools: autotest: increase some timeouts for failures when running under GDB

Tools: autotest: correct ordering of operations in mount test
2019-03-11 13:59:51 +11:00
Peter Barker
6418226106 Tools: autotest: increase test diagnostics
Tools: autotest: improve wait_distance_home_gt output

Tools: autotest: emit progress for parameter sets

Tools: autotest: add progress for RC health checks

Tools: autotest: remove pointless context
2019-03-11 11:25:04 +11:00
Peter Barker
2ef24e700e Tools: autotest: correct gripper tests
set_rc swallows messages - like the statustext messages we are looking
for
2019-03-11 10:46:57 +11:00
Peter Barker
d48eab893a Tools: autotest: stop swallowing critical messages with get_sim_time() 2019-03-10 21:55:51 +11:00
Peter Barker
38e26757fd Tools: autotest: add option to quieten some functions
Useful when you know the output is not going to be useful
2019-03-10 21:55:51 +11:00
Peter Barker
a504f9ac8d Tools: autotest: add option to use cached home for distance_to_home 2019-03-09 12:44:06 +11:00
Peter Barker
4d3ca97a0f Tools: autotest: correct pre-arm flags-OK checks 2019-03-08 23:22:22 +11:00
Peter Barker
194142b343 Tools: autotest: add simple test for fence prearms 2019-03-08 08:57:27 +09:00
Peter Barker
f2e3d377ad Tools: autotest: drain mav during RTL test to improve reliability 2019-03-07 14:22:09 +11:00
Peter Barker
91436c5314 Tools: autotest: add test for high-throttle-at-mode-change 2019-03-07 11:33:20 +11:00
Peter Barker
b1bbe09602 Tools: autotest: increase timeout on pid tuning 2019-03-07 00:15:05 +11:00
Peter Barker
f23c6e1624 Tools: autotest: better streamrate reset 2019-03-06 21:25:16 +11:00
Peter Barker
b4af1dae0f Tools: autotest: skip rudder disarm for balancebot 2019-03-06 10:45:56 +11:00
Peter Barker
5f315aab59 Tools: autotest: fix infinite hang in wait_statustext 2019-03-06 10:45:56 +11:00
Peter Barker
8c35ddc0eb Tools: autotest: add PID_TUNING test 2019-03-05 10:41:56 +11:00
Peter Barker
792fbc6240 Tools: autotest: allow imprecise home in set-home test
float<->integer conversion issues means this comes back imprecisely
2019-03-04 23:46:40 +11:00
Peter Barker
6103d5ebac Tools: autotest: add a simple dataflash-over-mavlink test 2019-03-02 09:28:19 +11:00
Pierre Kancir
4ac5fb42cd Tools: don't upload failed log on ardupilot server by default 2019-03-01 20:48:39 +11:00
Peter Barker
9dad451ef5 Tools: autotest: use start_subtest in arming test 2019-03-01 14:56:05 +11:00
Peter Barker
d6674a3bb1 Tools: autotest: correct progress message 2019-02-28 12:53:49 +11:00
Peter Barker
50687c9add Tools: autotest: ArmFeatures is common to all vehicles; use inheritted tests 2019-02-28 12:53:07 +11:00
Peter Barker
6fc4086726 Tools: autotest: accept home position before or after ack
autopilot may be out of space or time to send home position packet after
we have requested it
2019-02-26 14:01:41 +11:00
Peter Barker
31a9ac7dbd Tools: autotest: add test suite for Tracker 2019-02-26 08:03:56 +11:00
Peter Barker
e9fc158c8a Tools: autotest: eliminate use of recv_match with condition
We have functions for achieving this

Also, a lot of these places were missing timeouts, so any failure would
cause the entire suite to stop running
2019-02-22 16:30:05 +11:00
Francisco Ferreira
08fdd5c36c Tools: autotest: strip newline chars for comparing mission files
Windows is different from other OSes so remove the newline characters before comparing lines when making sure mission files are the same
2019-02-22 08:27:08 +11:00
Pierre Kancir
7e12f16be6 Tools: fix lambda test 2019-02-22 08:04:03 +11:00
Peter Barker
a117e4571d Tools: autotest: add simple Rally test 2019-02-20 18:03:38 +11:00
Peter Barker
27d6bebed3 Tools: autotest: add test that ArduPilot indicates it can do PARAM_FLOAT 2019-02-19 13:14:52 +11:00
Peter Barker
c0394e9577 Tools: autotest: tidy handling of SITL start position 2019-02-16 19:14:48 +11:00
Peter Barker
025f007f96 Tools: autotest: simplify mission loading 2019-02-16 10:27:41 +11:00
Peter Barker
e3368e193d Tools: autotest: add test for throttle failsafe 2019-02-14 11:49:59 +11:00
Mark Whitehorn
fd385c0f91 Tools: autotest: add quadplane output_motor_mask check
add comparator arg to wait_servo_channel_value and cleanup
2019-02-13 15:28:47 +11:00
Peter Barker
957f637043 Tools: autotest: add autotest for setting home position with command-int 2019-02-13 09:42:26 +11:00
Peter Barker
cf2c0ec334 Tools: autotest: print time taken for each test 2019-02-12 13:30:28 +11:00
Peter Barker
edfa2646f0 Tools: autotest: repeatedly apply parameter file 2019-02-09 18:17:00 +11:00
Peter Barker
6f1f98dc3c Tools: autotest: add assumption run_tests is only called once - remove hasInit 2019-02-09 11:31:17 +11:00
Pierre Kancir
8a7555bf56 Tools: autotest: fix up the arming tests
Tools: unify arm function failure message

Tools: get autodisarm time from parameter for autodisarm test

Tools: disable autodisarm for arm/disarm tests.

Tools: fix interlock channel for heli

Tools: simplify arming_test sub exclusion

Tools: fix empty string in progress

Tools: add back arming test to plane

Tools: allow single test run on Sub

Tools: remove old comments on autotest common

Tools: add vehicle type getter function

Tools: make get_rudder_channel abstract method

Tools: common make get_disarm_delay abstract method

Tools: make set_autodisarm_delay abstract method

Tools: rename set_throttle_zero to zero_throttle and use it

Tools: common.py remove unnecessary exception

Tools: subclass vehicle type
2019-02-09 10:04:57 +11:00
Peter Barker
fe2f9f1f14 Tools: autotest: improve autotest output 2019-02-07 08:51:13 +11:00
Peter Barker
4d2d1350c4 Tools: autotest: make changing mode more reliable
There are race conditions between setting mode switches and using
MAVProxy to change mode.  This should remove some of the issues.
2019-02-06 09:32:10 +11:00
Peter Barker
d33e5ea012 Tools: autotest: look for mavproxy files in cwd
While correct if you run autotest.py from the root of an ArduPilot git
repo, this is generally not correct.  The autotest server does not have
such a cwd; it runs it from one-directory-up.
2019-02-05 14:14:14 +11:00
Peter Barker
1fcd7fac06 Tools: autotest: add test for flip mode 2019-02-04 11:07:28 +09:00
Peter Barker
e23313e16b Tools: autotest: ensure RC input is at defaults before each test 2019-02-04 08:00:07 +11:00
Peter Barker
fa37ad344b Tools: autotest: refactor setting of rc defaults 2019-02-04 08:00:07 +11:00
Peter Barker
2834fd8017 Tools: autotest: add test for channel override cancel 2019-02-01 11:48:01 +11:00
Peter Barker
9aefaf5b92 Tools: autotest: add tests for GET_MESSAGE_INTERVAL 2019-01-30 13:56:55 +09:00
Peter Barker
429217f392 Tools: autotest: correct division-by-zero error 2019-01-17 12:30:56 +11:00
Peter Barker
d0aaf34db5 Tools: autotest: add option to skip tests if they're annoying us in CI 2019-01-14 20:15:47 +11:00
Peter Barker
55f751a8f4 Tools: autotest: add some tests for Copter parachute functions 2019-01-09 13:16:03 +11:00
Peter Barker
fe1ac46840 Tools: autotest: correct log Tee'ing 2019-01-04 13:41:36 +11:00
Peter Barker
7cb1051aee Tools: autotest: correct error message for mission upload/download 2019-01-02 20:33:17 +11:00
Peter Barker
e6bfbe5f07 Tools: autotest: fix initial mode switch position race
Solves a race condition where an initial setting of mode via mavlink
could be overwritten by the vehicle polling the RC channels and changing
mode based on the new positions.

This will require each vehicle to specify the mode expected without an
RC inputs present and the expected mode once the RC defaults have been
installed.  These two modes will need to be different to eliminate the
race condition.
2018-12-27 15:15:59 +11:00
Peter Barker
320ea4d7f5 Tools: autotest: remove old run_test function 2018-12-21 11:53:38 +11:00
Peter Barker
3b57635ec9 Tools: autotest: convert Copter to new tests framework 2018-12-18 10:06:09 +11:00
Peter Barker
22cc55a500 Tools: autotest: give message rate in drain 2018-12-18 10:06:09 +11:00
Peter Barker
7ad299c526 Tools: autotest: clarify arming tests messages 2018-12-18 10:06:09 +11:00
Peter Barker
7aa1d51585 Tools: autotest: move balancebot to new tests structure 2018-12-18 10:06:09 +11:00
Peter Barker
1f8db08dab Tools: autotest: show test output filename in summary 2018-12-15 21:39:29 +11:00
Peter Barker
28b0267b6c Tools: autotest: add timeout on Rover test_rc_overrides 2018-12-15 21:38:48 +11:00
Peter Barker
686bfc367e Tools: autotest: tee MAVProxy output to per-test file 2018-12-15 17:11:44 +11:00
Peter Barker
8528bcf78c Tools: autotest: tee individual test output to separate files 2018-12-15 10:02:11 +11:00
Peter Barker
8541a28637 Tools: autotest: support named tests 2018-12-15 10:02:11 +11:00
Peter Barker
dd78a5a921 Tools: autotest: use wallclock time for reboot 2018-12-14 16:57:29 +11:00
Peter Barker
da1f04e78c Tools: autotest: add a test for SYSID_ENFORCE 2018-12-14 12:44:31 +11:00
Peter Barker
e6c30f6405 Tools: autotest: use change_mode in apmrover2 for changing modes 2018-12-14 11:10:41 +11:00
Peter Barker
a320a54f66 Tools: autotest: new wait_heartbeat raises exception if none received 2018-12-14 11:10:41 +11:00
Peter Barker
ec288cd867 Tools: autotest: make reboot detection more reliable 2018-12-14 09:48:17 +11:00
Peter Barker
0d34052cef Tools: autotest: move code up 2018-12-10 12:52:41 +09:00
Peter Barker
dd88e6e85c Tools: autotest: correct wait_servo_channel_value error path
Also make flaps test a little more verbose
2018-11-29 09:48:31 +11:00
Peter Barker
02993b4ad0 Tools: autotest: delay between transitioning aux switch for arming
... on the theory that we debounce these so it's a good idea to give the
RC library a good look at each value
2018-11-26 17:35:07 +11:00
Peter Barker
88a003edd9 Tools: autotest: flake8 compliance 2018-11-24 08:30:02 +11:00
Peter Barker
f84370bb04 Tools: autotest: consolidate mission-loading functions
Also add sanity checks for mission loading

Tools: autotest: add missing import for arduplane.py
2018-11-16 10:06:25 +11:00
Peter Barker
1d2f8555c0 Tools: ardupilotwaf: adjust for new location of uploader.py 2018-11-15 09:55:14 +11:00
Andrew Tridgell
6b5088207b autotest: upload failed CI logs to autotest server 2018-11-10 21:23:02 +11:00
Peter Barker
7600d3205a Tools: correct race condition in interlock check 2018-11-04 21:38:15 +11:00
Peter Barker
4e82250055 Tools: autotest: add test for Copter loiter-to-alt 2018-10-30 17:50:46 +09:00
Peter Barker
a01c915173 Tools: autotest: improve debug in arm-with-radio 2018-10-30 15:37:18 +11:00
Peter Barker
2157999307 Tools: autotest: add tests for gripper mission items 2018-10-30 15:37:18 +11:00
Peter Barker
8985cc05c7 Tools: autotest: raise exception on get_parameter failure 2018-10-23 14:49:44 +11:00
Peter Barker
b8e1d26708 Tools: autotest: reduce dummy streamrate
Given we have trouble with the amount of data flowing around, doubling
this seems somewhat unfortunate.
2018-10-23 10:35:21 +11:00
Willian Galvani
bf1429ead7 Tools: Autotest: Fix ArduSub autotest 2018-10-21 09:01:14 +11:00
Peter Barker
e9d6c47f76 Tools: autotest: correct lamda->lambda 2018-10-19 08:54:56 +11:00
Peter Barker
a66cc52573 Tools: autotest: provide description of exceptions in constructors 2018-10-19 08:52:44 +11:00
Peter Barker
14d2012f54 Tools: autotest: add test for ekf navigation speed limits 2018-10-09 10:47:38 +11:00
Pierre Kancir
53e36931fb Tools: correct channel configuration for gripper test 2018-10-03 20:10:13 +10:00
Pierre Kancir
e087b03dd0 Tools: disable autodisarm test (broken) 2018-10-03 10:11:13 +02:00
Pierre Kancir
15e291aac9 Tools: don't set zero_throttle on arm/disarm 2018-10-03 10:10:25 +02:00
Pierre Kancir
0785706a94 Tools: test that heli interlock output cannot be high when disarmed
Co-authored-by: bnsgeyer <bnsgeyer@aol.com>
2018-10-03 10:09:30 +02:00
Pierre Kancir
752f78c80e Tools: test ARMING_RUDDER restrictions
Co-authored-by: bnsgeyer <bnsgeyer@aol.com>
2018-10-03 10:09:30 +02:00
Pierre Kancir
31d4f1b065 Tools: test that copter cannot arm with throttle too high
Co-authored-by: bnsgeyer <bnsgeyer@aol.com>
2018-10-03 10:09:30 +02:00
Pierre Kancir
553874f14a Tools: add arm/disarm with switch tests
Co-authored-by: bnsgeyer <bnsgeyer@aol.com>
2018-10-03 10:09:28 +02:00
Pierre Kancir
d37a74f46a Tools: fix arm_motors_with_rc_input and disarm_motors_with_rc_input 2018-10-03 17:24:52 +10:00
Pierre Kancir
9b7e406a55 Tools: fix use of unassign variable 2018-10-03 17:19:38 +10:00
Pierre Kancir
55f4be0515 Tools: make do_set_mode function more generic 2018-10-03 16:57:01 +10:00
Pierre Kancir
b80937cbd4 Tools: add timout to arm/disarm functions 2018-10-03 16:57:01 +10:00
Peter Barker
a7042e3847 Tools: autotest: tweak output messages, loosen camera trigger timeout 2018-09-08 12:56:15 +10:00
Peter Barker
6e44ea13d4 Tools: autotest: do not arm vehicle before flaps test 2018-09-07 23:18:43 +10:00
Pierre Kancir
d8c53bbd9c Tools: remove dependency on mavproxy for cmd_long based functions 2018-09-07 11:20:03 +10:00
Pierre Kancir
87a7fd0fbb Tools: remove dependency on mavproxy for arming/disarm 2018-09-07 11:20:03 +10:00
Pierre Kancir
e278a09668 Tools: don't use strict comparison for param fetch all to cope with TYPE one's 2018-09-06 15:30:06 +10:00
Peter Barker
5d317a8ef7 Tools: autotest: clear Rover waypoints before toggling them in 2018-09-06 15:29:28 +10:00
Peter Barker
f1a0ebfd10 Tools: autotest: reduce verbosity of wait-for-heading 2018-09-04 10:32:26 +10:00
Peter Barker
5c7e21d38f Tools: autotest: add test for clearing waypoints 2018-09-04 10:32:26 +10:00
Pierre Kancir
36d8ef1971 Tools: auto fetch parameter if in fetch_all list 2018-08-27 21:28:09 +10:00
Pierre Kancir
f6cc934678 Tools: pep8 corrections + correct variable shadowing 2018-08-27 17:08:47 +10:00
Pierre Kancir
7f601db05b Tools: add gripper tests 2018-08-27 14:39:49 +10:00
Peter Barker
a80d27eeff Tools: autotest: fetch parameters after applying parameter file 2018-08-23 11:34:37 +10:00
Pierre Kancir
9c6e75f45b Tools: allow to retry to get parameters before timeout 2018-08-21 21:26:39 +10:00
Pierre Kancir
cc8aca1619 Tools: various fixes for Copter tests
Tools: correct altitude check

Tools: correct tests syntax

Tools: add autotest syntax check on common

Tools: search for syntax mistake on autotest lambda

Tools: put copter in hover trottle to prevent crash

Tools: reboot after baterry failsafe test

Tools: copter takeoff wait_ready_to_arm before arming

Tools: arm copter after land on RTL

Tools: reset copter battery voltage after battery failsafe
2018-08-21 20:41:09 +10:00
Peter Barker
2a174a5dac Tools: add test for Sprayer-on-Rover 2018-08-17 15:33:35 +09:00
Pierre Kancir
2f9f793ccf Tools: add arm and disarm tests 2018-08-15 16:38:20 +10:00
Peter Barker
6e7e24ac91 Tools: autotest: raise exception, don't return it
Spotted by @khancyr
2018-08-15 10:16:13 +10:00