Commit Graph

515 Commits

Author SHA1 Message Date
Peter Barker
a292fe1b8b autotest: use wait_statustext rather than mavproxy.expect
This is important when running under Valgrind as the text can be
significantly delayed.  wait_statustext times out in simulation time,
whereas mavproxy.expect has a flat 60s timeout
2021-02-17 18:16:04 +11:00
Peter Barker
e4d5a92721 autotest: add wait_distance_to_nav_target method 2021-02-13 19:34:52 +11:00
Peter Barker
a5706a18af autotest: handle Py2 not having ConnectionResetError built in 2021-02-12 18:24:18 +11:00
Iampete1
904b493809 Tools: autotest, common.py remove extra comma 2021-02-11 09:20:15 +11:00
Peter Barker
4324d66c13 autotest: loosen time constraint on mavlink messages in magcal
Saw an error where we didn't get one of these in 5 seconds.

That sounds like too much.  But we'll loosen the constrain anyway
2021-02-10 09:28:45 +11:00
Peter Barker
bd8384b322 autotest: break out a get_altitude method 2021-02-10 09:28:25 +11:00
Alessandro Apostoli
e2aaf4c216 Tools: autotest, fix for frsky not defined error (#4) 2021-02-10 09:27:58 +11:00
Peter Barker
d9dd93bcdd autotest: don't run frsky tests armed for the most part 2021-02-10 09:27:58 +11:00
Peter Barker
742d5a9fa0 autotest: add body_frame_velocity 2021-02-08 22:44:32 +11:00
Peter Barker
f65bee80dc autotest: use BATTERY_STATUS to detect sub reboot
Sub doesn't implement AP_Stats so we have custom reboot detection for
it.

The current look-for-string strategy is flawed - we're missing the
string on reboot
2021-02-03 13:58:17 +11:00
Pierre Kancir
e13a35abc1 Autotest: check for empty message before trying to use it 2021-02-03 12:56:01 +11:00
yaapu
bb576a49b8 Tools: added autotest for frsky rpm telemetry 2021-02-03 12:49:38 +11:00
Andrew Tridgell
d47afb2406 autotest: added AHRSTrim test and add trim to accel cal test
this ensures the handling of AHRS trim is correct
2021-01-25 16:24:50 +11:00
Peter Barker
ad2ab333f9 Tools: autotest: allow autotest to connect directly to SITL 2021-01-24 09:25:45 +11:00
Peter Barker
8c7d63433c autotest: clear mission ourselves rather than with MAVProxy at end of test 2021-01-24 09:25:45 +11:00
Peter Barker
1fec88af21 autotest: make arming test a little more verbose 2021-01-21 22:15:16 +11:00
Peter Barker
3279400e2e autotest: disarm_with_rc_input shortcuts if it sees rudder-disarm-disabled 2021-01-21 14:25:47 +11:00
Peter Barker
f452c6bb51 autotest: break out a statustext_in_collections method from wait_statustext 2021-01-21 14:25:47 +11:00
Andrew Tridgell
58b9cd2c6e autotest: added assert_reach_imu_temperature() abstraction 2021-01-21 13:09:21 +11:00
Andrew Tridgell
5a5ba26468 autotest: expanded accelcal test to check values
this checks the resulting accelcal is correct within 1%
2021-01-21 13:09:21 +11:00
Andrew Tridgell
0c3655b01f autotest: fixed epsilon handling in set_parameters 2021-01-21 13:09:21 +11:00
Peter Barker
c7a6047904 autotest: add option to retry tests / create and use Test definition object 2021-01-21 10:23:17 +11:00
Peter Barker
03b2473c61 autotest: correct get_parameter_direct attempts decrement 2021-01-20 20:06:46 +11:00
Andrew Tridgell
c396d15890 Revert "autotest: ensure defaults files don't set already-default-values"
This reverts commit 3d431cd4f1.

It breaks MissionPlanner SITL. We can re-apply once MissionPlanner
copes with external_model.
2021-01-20 08:54:43 +11:00
Peter Barker
3d431cd4f1 autotest: ensure defaults files don't set already-default-values
autotest: mark some vehicles as having external physics models

autotest: add default_params_filename to some vehicle info
2021-01-19 10:34:00 +11:00
Peter Barker
8f9d3909f1 autotest: model_defaults_filepath always returns a list 2021-01-19 10:34:00 +11:00
Peter Barker
30929e7f1a autotest: add verbose option to assert_sensor_state 2021-01-18 21:25:58 +11:00
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