Commit Graph

802 Commits

Author SHA1 Message Date
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