Commit Graph

741 Commits

Author SHA1 Message Date
Peter Barker 515b79a6ca autotest: remove un-needed calls to drain_mav_unparsed
these calls are generally bad now, given we have context_collect things going on which always want to see messages coming in
2022-07-20 15:17:25 +10:00
Peter Barker a8357531d1 autotest: pause SITL process while draining mav unparsed 2022-07-20 15:17:25 +10:00
Peter Barker d2caebf39c autotest: increase time allowed for getting statustexts
frsky is run i9n a thread  - and signficiant speedsup seem to adversely affect it
2022-07-19 11:00:27 +10:00
Peter Barker 84adb059ed autotest: correct frsky text comparison bug
reusing the variable "text" here crewed up subsequent receiving of messages as it could reset the text from empty to the most recently received text.
2022-07-19 11:00:27 +10:00
Peter Barker 271b4d7d3c autotest: disable mavutil autoreconnect in drain_mav
The process may not be available
2022-07-19 11:00:27 +10:00
Peter Barker acd9fb9c0a autotest: pause/unpause SITL while draining mav
If Python can't keep up with the message volume coming from the autopilot we never manage to drain all messages from the vehicle.

So try pausing/unpausing the simulation so we can drain the link...

AT-1968.6: AP: PreArm: Radio failsafe on
AT-1969.9: AP: PreArm: Radio failsafe on
AT-1971.2: AP: PreArm: Radio failsafe on
AT-1972.4: AP: PreArm: Radio failsafe on
AT-1973.7: AP: PreArm: Radio failsafe on
AT-1974.9: AP: PreArm: Radio failsafe on
AT-1975.3: Drained 2000283 messages from mav (7218.974791/s)
AT-1975.3: Exception caught: Traceback (most recent call last):
  File "/mnt/volume_nyc3_01/autotest/APM/APM/Tools/autotest/common.py", line 699
8, in run_one_test_attempt
    self.context_pop()
  File "/mnt/volume_nyc3_01/autotest/APM/APM/Tools/autotest/common.py", line 499
3, in context_pop
    self.set_parameters(dead_parameters_dict, add_to_context=False)
2022-07-19 11:00:27 +10:00
Peter Barker e38adc7d14 autotest: pause/unpause SITL while draining mav
If Python can't keep up with the message volume coming from the autopilot we never manage to drain all messages from the vehicle.

So try pausing/unpausing the simulation so we can drain the link...

AT-1968.6: AP: PreArm: Radio failsafe on
AT-1969.9: AP: PreArm: Radio failsafe on
AT-1971.2: AP: PreArm: Radio failsafe on
AT-1972.4: AP: PreArm: Radio failsafe on
AT-1973.7: AP: PreArm: Radio failsafe on
AT-1974.9: AP: PreArm: Radio failsafe on
AT-1975.3: Drained 2000283 messages from mav (7218.974791/s)
AT-1975.3: Exception caught: Traceback (most recent call last):
  File "/mnt/volume_nyc3_01/autotest/APM/APM/Tools/autotest/common.py", line 699
8, in run_one_test_attempt
    self.context_pop()
  File "/mnt/volume_nyc3_01/autotest/APM/APM/Tools/autotest/common.py", line 499
3, in context_pop
    self.set_parameters(dead_parameters_dict, add_to_context=False)
2022-07-19 11:00:27 +10:00
Peter Barker 28ed2e3cd5 autotest: add support for building alternate binaries
e.g. adding features ordinarily compiled out
2022-07-19 09:09:05 +10:00
Peter Barker bceaa10794 autotest: add a test for rally point altitudes 2022-07-14 11:49:53 +10:00
Andrew Tridgell 2f7a8769c0 autotest: added --ubsan and --ubsan-abort to sim_vehicle.py and autotest.py
allows for undefined behaviour checking in SITL
2022-07-12 11:00:08 +10:00
Peter Barker 2ca68da77a autotest: correct setting mode by number 2022-07-12 08:51:21 +10:00
Peter Barker 7647e38f3f autotest: create get_home_tuple_from_mission method
Useful if you want to start a mission where a saved waypoint file's home location is
2022-07-10 20:59:52 +10:00
Peter Barker 86096261d0 autotest: add new wait_and_maintain_range method 2022-07-07 21:29:43 +10:00
Peter Barker 215842fe82 Tools: add tests for ICE Planes 2022-07-01 19:33:51 +10:00
Peter Barker bc12a61c9a autotest: use slightly faster recv_msg call in drain_mav
Cuts out some code in pymavlink's recv_match which we don't need here.  We even explicitly don't run the idle hooks which pymavlink supplied when we're running under drain_mav
2022-06-30 09:46:13 +10:00
Peter Barker 208554d402 autotest: correct diagnostic message 2022-06-29 21:03:42 +10:00
Peter Barker f6816f38dc autotest: add timeout in drain_mav
At large speedups we can create more telemetry than we can consume.  Detect that and raise an exception, assuming we should be able to drain anything within 2 minutes
2022-06-29 21:03:42 +10:00
Peter Barker 08ae4f050c autotest: fix race condition in button test
The subsequent test could end up arming the vehicle based on this left-over state.
2022-06-16 21:24:31 +10:00
Peter Barker 39a0ecbb4b autotest: check rate is configured after we do the rate check
This is just to make sure that the autopilot isn't losing the configuration somehow.
2022-06-16 10:04:08 +10:00
Peter Barker 0697ce19d2 autotest: tidy wait_disarmed 2022-06-15 09:11:51 +10:00
Peter Barker b550949766 autotest: scale SITL RC input according to speedup
Too slow when running at 100 times speedup
2022-06-13 21:41:41 +10:00
Peter Barker 171bdd9e5b autotest: better diagnostics for mission transfer 2022-06-12 15:56:53 +10:00
Peter Barker e02d50d0e8 autotest: increase allowed time for mission item download
Because we're involving round-trip times to the Python and back, we need to allow more time to pass on the autopilot when downloading very large missions.  Add a factor based on speedup
2022-06-12 15:56:53 +10:00
Peter Barker ad4fc316ec autotest: increase sample period for HIGH_LATENCY2 test
Should be useful at higher speedups
2022-06-12 15:56:53 +10:00
Peter Barker bb36cedee3 autotest: correct message hook handling
Fun with closures, and not removing hooks soon enough when popping contexts.
2022-06-12 15:56:53 +10:00
Peter Barker b8407a4bec autotest: adjust current wp reset 2022-05-15 21:17:50 +10:00
Andrew Tridgell 151f17d563 autotest: reset mission on takeoff for quadplanes 2022-05-15 21:17:50 +10:00
Peter Barker 287573fff7 autotest: add test for large circle radii in NAV_LOITER_TURNS 2022-05-11 17:40:35 +10:00
Peter Barker b659360d64 autotest: test DO_CHANGE_SPEED mission item for Plane 2022-05-05 10:48:35 +10:00
Peter Barker 43b5f22c1a autotest: add test for avoidance resume-auto-or-loiter action 2022-04-21 06:59:39 +10:00
Peter Barker 1340132f6f autotest: add rangefinder test 2022-04-19 10:26:10 +10:00
Peter Barker c33f6f3a8d autotest: add tests to ensure we get BCN, RPM and PRX/PRXR log msgs 2022-04-13 16:22:19 +10:00
Peter Barker 7c526d52fe autotest: correct streaming-boolean bug for parsing of log structures from code 2022-04-06 21:54:15 +10:00
Peter Barker 55d0cf4b03 autotest: add diagnostics for log parse issues 2022-04-06 21:54:15 +10:00
Peter Barker 9f7ae1ee96 autotest: extract ids and message infos per-file, not on aggregate
Will allow for better diagnostics when something goes wrong
2022-04-06 21:54:15 +10:00
Peter Barker 582eed12bf autotest: correct extraction of fields from LogWrite messages 2022-04-05 17:57:40 +10:00
Peter Barker 62fe90caa1 autotest: add more convenience methods for checking received data 2022-04-03 09:35:09 +10:00
Peter Barker 05be2ac8c9 autotest: print mag cal progress messages when testing mag cal 2022-03-26 11:17:14 +11:00
Peter Barker 79098d1d10 autotest: correct diagnostic message symlink->link 2022-03-26 11:16:55 +11:00
Peter Barker 7a62b5429b autotest: add test for landing speed 2022-03-23 21:07:05 +11:00
Joshua Henderson fcb0538fef autotest: common check_mission_items_same loosen z to 1E-3 2022-03-16 18:41:52 +11:00
Andrew Tridgell 6fcf85edb8 autotest: more changes for plane disarm disallow 2022-03-09 17:13:45 +11:00
m 37abfb98dc autotest: Copter Pause/Continue in AUTO and GUIDED modes with SCurves 2022-03-08 13:12:36 +09:00
Peter Barker f2fe55b5da autotest: correct exception handling for Python 3.10 2022-03-07 19:36:05 +11:00
Peter Barker 3fa12152f6 autotest: add tests for high latency control protocol 2022-03-05 11:08:30 +11:00
Peter Barker 850227ffdb autotest: add test for THR_FAILSAFE==2 and throttle output 2022-03-01 10:29:37 +11:00
Peter Barker 122d97ece7 autotest: add comment clarifying what an error actually means 2022-02-28 12:47:57 +11:00
Peter Barker 7bb13e934d autotest: add support for multi-line log formats 2022-02-28 12:47:57 +11:00
Peter Barker e6c1bc2402 autotest: fix MAVFTP test 2022-02-26 10:11:19 +11:00
Peter Barker 69e0e544d1 autotest: loosen constraints on AccelCal test 2022-02-23 18:50:28 +11:00