Commit Graph

538 Commits

Author SHA1 Message Date
Peter Barker
ba1973d343 autotest: parse messages when setting parameters
This breaks some tests which are waiting on statustexts while setting
parameters
2021-01-18 15:19:39 +11:00
Randy Mackay
1f8b48e8f7 Tools: common autotest spelling fix
reach should be reached
2021-01-16 08:24:23 +09:00
Peter Barker
cd8a393ac2 autotest: create own RC thread to handle setting of RC overrides
autotest: prevent method-on-undef problem in case of early test failure

autotest: plumb MAVProxy rc input back in for switch test

autotest: close off rc thread in case of timeout
2021-01-15 20:56:30 +11:00
Peter Barker
e85e6d3375 autotest: use new set_parameters in place of many set_parameter calls
autotest: use set_parameters for applying from parameter file

autotest: use set_parameters in place of many set_parameter calls
2021-01-13 15:09:29 +11:00
Peter Barker
2917c75f35 autotest: add option to timeout parameter fetching in system time 2021-01-13 15:09:29 +11:00
Peter Barker
83f2f365c0 autotest: implement a more efficient set_parameters, implement set_parameter in terms of it 2021-01-13 15:09:29 +11:00
Peter Barker
8497f8fc73 autotest: correct some timeout issues around Copter takeoff 2021-01-13 12:24:17 +11:00
Peter Barker
e7aefc7fe4 autotest: make polling home position quiet by default 2021-01-13 12:24:17 +11:00
Peter Barker
5318538182 autotest: reboot SITL when moving from EKF10 to EKF2 in mag test
Bad things happen when moving from one to the other...
2021-01-13 12:24:17 +11:00
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