Commit Graph

891 Commits

Author SHA1 Message Date
bugobliterator
fcb622c610 autotest: add test for lua modules 2023-04-28 12:36:08 +10:00
Peter Barker
2271827c9d autotest: add tests for compass prearms 2023-04-19 14:25:06 +10:00
Peter Barker
2529c7fc40 autotest: add test for RESET_MODE_SWITCH 2023-04-18 09:19:20 +10:00
Peter Barker
f518c4f4d4 autotest: verify new safety switch state in set_safetyswitch 2023-04-17 13:25:55 +10:00
Peter Barker
558cec573b autotest: wait ready to arm in autotest
AKA avoid dreaded gyros-inconsistent failure
2023-04-16 21:18:36 +10:00
Peter Barker
5cc046b9cc Tools: AP_Arming ensures mission items present when in auto mode
Co-authored-by: Henry Wurzburg <hwurzburg@yahoo.com>
2023-04-14 07:49:54 +10:00
Peter Barker
54aca7dc0d autotest: exempt sailboats from initial location check
we have a sanity check that when you reboot a vehicle that soon afterwards the vehicle is in the place we expect it to start.

That's fine for most vehicles, which stay put.  But we start the ship simulation with wind, so it can actually drift before we get around to checking its location.  Simply skip this check for now (we could, perhaps, allow for a very large radius instead?)
2023-04-13 07:05:38 +10:00
Peter Barker
b620ba23a9 autotest: correct implicit reboot after a failed test
correct problem where we only rebooted if the vehicle was armed after a failed test.

Should correct cascading failures after some tests
2023-04-11 00:29:45 +10:00
Peter Barker
ae37d76f2d autotest: allow other prearm failures while waiting for estop prearm
accels inconsistent was popping up in here.

We can ignore that - we only care we won't arm because of the estop being active.  This will also save a bit of time with the removal of the raw delay-for-10-seconds
2023-04-09 20:48:34 +10:00
bugobliterator
50a760d8a5 Tools: add --enable-dronecan-tests option to autotest 2023-03-29 17:16:39 +11:00
bugobliterator
c90cf03619 autotest: replace sitl_32bit with force_32bit 2023-03-29 17:16:39 +11:00
tzarjakob
6fa14ffe87 Tools: configuration of Precision Landing for custom build server 2023-03-27 09:04:07 +11:00
Peter Barker
f12777f369 autotest: add test for GuidedYawRate being indpendent of set-rate rate
A bug is being fixed where we couldn't achieve the maximum rate due to the input speed of the guided command.

This makes sure the rate achieved is independent of the rate at which the attitude rate is being set
2023-03-21 08:23:12 +09:00
bugobliterator
e2509b7c6b autotest: add support for setting number of auxiliary IMUs 2023-03-21 10:04:16 +11:00
Peter Barker
924a1b7810 Tools: add documentation for SIM_OPOS* and SIM_FLOAT_EXCEPT 2023-03-14 10:44:28 +11:00
Peter Barker
e967fad32a autotest: augment IE24 test with fuel-remaining test 2023-03-11 11:50:20 +11:00
Randy Mackay
bfa15133c7 Tools: autotest fixes for rover
fixes camera mission, set-message-interval, request-message,
SendToComponents
2023-03-01 18:18:51 +11:00
Peter Barker
c7fe8f7c33 autotest: add test for transitioning with disabled airspeed sensor 2023-02-28 21:43:09 +11:00
Peter Barker
1e325d4aaa autotest: remove default value for paramValue in setGCSfailsafe
All callers were supplying a value, and it isn't clear why zero makes a
good default.
2023-02-26 17:31:11 +11:00
Pierre Kancir
0b7ef942b4 Tools: move setGCSfailsafe in common 2023-02-24 09:41:17 -08:00
Peter Barker
df06e85450 autotest: fix arming checks test
waity for accels/gyros to settle
2023-02-24 09:21:42 +11:00
Peter Barker
8ce904559d autotest: correct armable time calculation 2023-02-24 09:21:42 +11:00
Tom Pittenger
617da9a873 Tools/autotest: add JUMP_TAG support 2023-02-22 05:33:38 -08:00
Peter Barker
f5bda98a05 autotest: adjust for new emission of IN_PROGRESS mavlink messages
ignored for the most part, but explicit test added that we receive one when doing cal
2023-02-21 17:07:41 +11:00
Peter Barker
1aabcbd4b9 autotest: add more install-script-in-context methods 2023-02-17 12:54:49 +11:00
Peter Barker
d426c73d0e autotest: rename context's example_scripts to installed_scripts 2023-02-17 12:54:49 +11:00
Peter Barker
69b8e30f28 autotest: rename remove_example_script to remove_installed_script 2023-02-17 12:54:49 +11:00
Peter Barker
6678689312 autotest: add install_example_script_context 2023-02-16 11:57:18 +11:00
Peter Barker
13e3556e18 autotest: document SIM_ESC_TELEM 2023-01-18 18:07:23 +11:00
Peter Barker
8e33476bfd autotest: test EPM gripper 2023-01-18 10:09:23 +11:00
Peter Barker
ccd700a990 autotest: fix whitelisted parameter list
move to whitelist crossed with another PR which breaks CI
2023-01-17 21:19:49 +11:00
Peter Barker
d533517fc4 autotest: create whitelist for undocumented SIM_ parameters
Rather than creating a blanket exception for SIM_ parameters, have a whitelist of known-undocumented parameters.

This will create a ratchet where new SIM_ parameters must be documented.
2023-01-17 11:23:40 +11:00
Henry Wurzburg
8806088404 Tools: make MAG params consistent names 2023-01-17 08:45:30 +11:00
Peter Barker
b441c24eaa autotest: use percentage error when determining if z is preserved
floating point storage means an absolute error doesn't work
2023-01-14 23:23:29 +11:00
Peter Barker
128a6430de autotest: add test for AHRS backend wind estimates 2023-01-04 12:30:27 +11:00
Iampete1
7b171867af Tools: autotest: set new ARSPD_ENABLE param where needed 2023-01-03 10:17:56 +11:00
Peter Barker
7d38164176 autotest: add simple test for LoiterAltQLand 2022-12-31 10:58:19 +11:00
Leonard Hall
fea86f78ca AutoTest: Increase mission timeout to account for lower corner acceleration 2022-12-30 17:03:32 +09:00
Peter Barker
021cb75d5b Tools: autotest: use forced reboot argument 2022-12-06 11:20:08 +11:00
Peter Barker
dcf41f2396 autotest: add additional tests for private channels 2022-11-29 10:32:02 +11:00
Peter Barker
d1cff53ba1 autotest: add test for mavlink private-channel 2022-11-29 10:32:02 +11:00
Andrew Tridgell
76b83c3d57 autotest: fixed aerobatics test for new Schedules location 2022-11-28 10:40:50 +11:00
Henry Wurzburg
ef65274b9c Tools: add synthetic current sensor,fix SITL current 2022-11-24 06:53:35 +11:00
Andrew Tridgell
0abeca15e2 autotest: added scripting aerobatics test 2022-11-10 13:53:15 +11:00
Peter Barker
8777d68ac1 autotest: drain self.mav while waiting on other link
In the short period of time it takes for us to get organised/draining mavlink connections, the ArduPilot process might block writing to the primary mavlink connection - in which case we'll never get the message we requested.

Should solve

2022-08-31T23:17:43.6904119Z AT-0227.6: waiting for a message - any message....
2022-08-31T23:17:43.6904958Z AT-0227.6: Received (ATTITUDE {time_boot_ms : 3146, roll : 0.00013471684360411018, pitch : -4.076504410477355e-05, yaw : -2.1274349689483643, rollspeed : 6.679168291157112e-05, pitchspeed : 3.297374496469274e-05, yawspeed : 9.125166684498254e-07})
2022-08-31T23:17:43.6905505Z AT-0227.6: Waiting for mission count of (3) from (1:1) to (243:250)
2022-08-31T23:17:43.6905909Z AT-0227.6: Asserted mission count (type=2) is 3 after 0.100000s
2022-08-31T23:17:43.6906252Z AT-0227.6: Get first item on new link
2022-08-31T23:17:43.6906620Z AT-0289.2: Received exception (Did not receive MISSION_ITEM_INT
2022-08-31T23:17:43.6907047Z Traceback (most recent call last):
2022-08-31T23:17:43.6907386Z   File "/__w/ardupilot/ardupilot/Tools/autotest/rover.py", line 3067, in test_rally
2022-08-31T23:17:43.6907719Z     m2 = self.get_mission_item_int_on_link(
2022-08-31T23:17:43.6908080Z   File "/__w/ardupilot/ardupilot/Tools/autotest/rover.py", line 2288, in get_mission_item_int_on_link
2022-08-31T23:17:43.6908469Z     raise NotAchievedException("Did not receive MISSION_ITEM_INT")
2022-08-31T23:17:43.6908841Z common.NotAchievedException: Did not receive MISSION_ITEM_INT
2022-08-31T23:17:43.6909118Z )
2022-08-31T23:17:43.6909468Z AT-0289.2: Exception caught: Did not receive MISSION_ITEM_INT
2022-11-09 09:17:08 +11:00
Peter Barker
4249fc04b7 autotest: tidy advanced failsafe test 2022-10-25 11:31:14 +11:00
Peter Barker
6d19f77325 autotest: add missing unpause_sitl() calls 2022-10-22 15:14:55 +11:00
Peter Barker
cafce7671d autotest: slow down specific tests so they pass 2022-10-22 15:14:55 +11:00
Peter Barker
b5cd149c1d autotest: test setting non-default-streamed message to default interval 2022-10-18 10:11:00 +11:00
Peter Barker
bacbac798c autotest: add tests for embedded defaults parsing 2022-10-13 14:38:30 +11:00
Andrew Tridgell
9dd2301198 autotest: move do_aux_function to common 2022-09-30 07:44:42 +10:00
Peter Barker
0c5f972ddb autotest: add ability to watch-and-maintain from SIM_STATE.alt 2022-09-29 20:00:01 +10:00
Peter Barker
87dfd7f541 autotest: remove use of fstring
breaks under python2
2022-09-28 08:17:02 +10:00
Peter Barker
8e3021e147 autotest: check target system on return mission_item_int packets 2022-09-25 19:25:53 +10:00
Peter Barker
f9bc7e44f8 autotest: add a method to easily install message printer 2022-09-22 18:14:49 +10:00
m
635df2ca45 autotest: check local home location 2022-09-21 15:58:25 +10:00
Peter Barker
267c16cd72 autotest: wait for heartbeat before determining armed state
Fixes a race condition when finishing a mission where we may receive the disarmed text but the most recent heartbeat says we are armed.
2022-09-19 17:52:18 +10:00
Peter Barker
0e9abea655 autotest: explicitly fail reboot if armed 2022-09-19 17:52:18 +10:00
m
61bb575422 autotest: Fix watch_altitude_maintained for Copter 2022-09-13 07:43:15 +10:00
Peter Barker
b1909d9edf autotest: create and use a Result object to ship failure data around 2022-09-12 08:49:04 +10:00
Peter Barker
ba6cf1a42b autotest: remove disabled LogUpload test
This has been unused for a long time, and is getting in the way of reforms.  Its position as a test rather than as a part of a framework was always going to cause oddities, particularly after we split the Copter tests into several chunks.
2022-09-11 20:45:13 +10:00
Peter Barker
87e97ca5b2 autotest: remove syntax test for test lambdas
We no longer permit the use of lambda functions in test lists
2022-09-11 17:21:38 +10:00
Peter Barker
cd50b91904 autotest: correct running of single test
... and stop using run_tests entrypoint to the AutoTest objects as it does cause confusion
2022-09-11 17:15:53 +10:00
Peter Barker
bb1c43b0a2 autotest: ensure MAVProxy arm attempt times out 2022-09-11 17:00:50 +10:00
m
3fdcf5f940 autotest: test landed state of copter during takeoff in auto mode 2022-09-10 21:53:23 +10:00
Peter Barker
80c36ecc97 autotest: use reflection to collect test details
We had a pattern emerging of using the test name as the method name to contain the actual test.  We also tended to duplicate the docstrings in the test description - or omit the docstring.

This uses reflection to retrieve both the test name and the description, meaning less duplication of this information and enforcing having docstrings on the test methods.
2022-09-10 18:27:27 +10:00
Peter Barker
b06afa8316 autotest: reset sitl if forced disarm fails 2022-09-10 14:35:25 +10:00
Peter Barker
71d1c050b3 autotest: move log_name method for balancebot to within class 2022-09-09 20:32:59 +10:00
Michael du Breuil
80d7bf9b11 Tools: Update autotest to accomodate accel cal changes 2022-09-09 08:52:14 +10:00
Peter Barker
a7aa5b6897 autotest: do not wait for ACK from reboot command
Several attempts have been made to make retrieving the reboot's ack reliable, and they've all failed.

So stop waiting for the ACK....
2022-08-29 08:24:03 +10:00
Peter Barker
eb0f932b52 autotest: remove global variable
... progress is no longer static and hasn't been for years
2022-08-28 10:09:47 +10:00
Peter Barker
430e52a91b autotest: remove constant in target_component check when downloading mission 2022-08-26 14:38:12 +10:00
Peter Barker
2e2ffbe4ac autotest: correct reset of autoreconnect in case of exception
always true in practice
2022-08-26 14:38:12 +10:00
Peter Barker
b6c4930b3a autotest: explicltly dis/reconnect when customising commandline
We *know* the connection is going away, so wecan force the reconnect rather than waiting for mavtcp's reconnect logic to kick in
2022-08-26 14:38:12 +10:00
Peter Barker
8b5afb4a24 autotest: loop across recv_match in assert_receive_message
pymavlink sleeps for half the passed-in timeout which is no good if we are willing to wait for 30 seconds for a message!
2022-08-24 10:08:27 +10:00
Peter Barker
8a13fb0f6d autotest: use assert_receive_message
Removes several block-forever calls
2022-08-24 10:08:27 +10:00
Peter Barker
87eb703bc1 autotest: terminate FTP session after transfering files
race condition starting the second MAVProxy if the first session isn't terminated
2022-08-22 09:01:18 +10:00
Peter Barker
af7208a65e autotest: cast packet count to floast before determining rate
Could be causing rate to be zero on autotest server
2022-08-20 21:52:20 +10:00
Peter Barker
cd207164a2 autotest: correct Rover DriveMission test
4 would seem to have been just a magic number and could be missed on faster speedups
2022-08-19 17:04:54 +10:00
Peter Barker
e091e8ad33 autotest: clear context before looking for GPS type
Will clarify the output as currently we look through the text messages for all of the previous gps types when trying to find the detection message for the current GPS
2022-08-17 09:57:39 +10:00
Peter Barker
bd2ef2e413 autotest: pop extra contexts post-test to clean up message hooks 2022-08-17 09:57:12 +10:00
Peter Barker
00d3af6fc5 autotest: handle terrain requests internally to autotest
We will cache all required SRTM data within the autotest branch
2022-08-16 11:12:44 +10:00
Peter Barker
9f58e7df31 autotest: add test for quadplane booting in auto 2022-08-16 07:24:22 +10:00
Peter Barker
bbff00dc0d autotest: be generous with mission upload timeouts
A *lot* of simulated time can pass while the Python gets its act together.  Allow a very large amount of time to pass while uploading missions.
2022-08-14 08:21:07 +10:00
Peter Barker
eed9c2e38b autotest: validate kwargs to wait_and_maintain_range 2022-08-14 07:52:42 +10:00
Peter Barker
fecf7c2e0c autotest: augment Plane TerrainMission to check we *do* follow the terrain 2022-08-09 14:31:14 +10:00
Peter Barker
d555c49230 autotest: allow a test to override speedup
This is a crutch for poorly-behaving tests.
2022-08-08 21:33:30 +10:00
Peter Barker
e92d4c6fc5 autotest: add test for WP_YAW_BEHAVIOUR 0
With behaviour 0 anbd typemask specifying ignore yaw/yaw_cds the yaw should reamin fixed
2022-08-08 21:33:03 +10:00
Peter Barker
d7d473d1f9 autotest: correct assert_prearm_failure to not try to arm vehicle 2022-08-05 17:25:14 +10:00
Peter Barker
f57e3668e3 autotest: do no drain mav (i.e. pause sitl) while delaying for sim time 2022-07-29 11:15:59 +10:00
Peter Barker
82bc2a7d85 autotest: adjust Plane EKF check for new configured-backend check 2022-07-28 15:53:13 +10:00
bugobliterator
2375564bb2 autotest: add test for CAN node health pre arm check 2022-07-27 18:18:03 +10:00
Peter Barker
ccc25cb8d7 autotest: increase time allowed for mission download
we don't need to be particularly tight on timing here
2022-07-23 18:36:10 +10:00
Peter Barker
b69a75098f autotest: avoid draining mav while waiting for motors-armed heartbeat 2022-07-23 10:56:52 +10:00
Peter Barker
82337c9058 autotest: make search of dflog for required messages faster
Doing these in parallel means we don't need to parse the large file multiple times
2022-07-22 09:13:25 +10:00
Peter Barker
a306c4c506 autotest: increase timeout allowed for mavlite parameter test
the FRSky thread isn't any faster, but ArduPlane's speedup was increased.  So allow more simulated time to get the data
2022-07-21 14:31:32 +10:00
Peter Barker
3c700bdf44 autotest: disable terrain during frsky passthrough test
If terrain isn't available then our expected statustext gets blatted with one which RCTelemetry library emits
2022-07-21 14:31:32 +10:00
Peter Barker
aa7987a4fb autotest: correct upload/download-mission timeouts 2022-07-21 14:31:32 +10:00
Peter Barker
e27b98f47e autotest: wait for Plane to slow down after frsky test
disarming via mavlink can fail if we think we're still moving
2022-07-21 14:31:32 +10:00
Peter Barker
3e89e32d8a autotest: comment out unused context_start_custom_binary method
Broken under Python2.

Also fix some flake8 problems under flake8 under Python2
2022-07-21 09:59:40 +10:00