Commit Graph

62 Commits

Author SHA1 Message Date
Peter Barker
b23ea9a47b Tools: autotest: fix race condition on parameter values 2018-07-05 11:48:08 +10:00
Peter Barker
38898dc793 Tools: autotest: add test for vision position estimate 2018-06-30 10:11:10 +10:00
Peter Barker
b197d05476 Tools: autotest: allow for return of negative values in parameters 2018-06-29 21:39:59 +10:00
Peter Barker
975b8c2e5f Tools: autotest: use reboot to apply parameter changes; avoid sim restart
Previously we stopped the simulation to ensure parameter changes are
applied to the simulated vehicle.  We can now reboot the simulated
autopilot, so these patches make use of those changes.

One big advantage is that the --gdb option is in play for the applying
of the parameters to the vehicle.
2018-06-29 10:54:27 +10:00
Peter Barker
0b8b23baf6 Tools: adjust tests for vfr_hud getting absolute altitude 2018-06-05 09:38:20 +10:00
Peter Barker
fd4463de68 Tools: add more information on test failure 2018-05-15 20:06:05 +09:00
Peter Barker
f3d6d8e236 Tools: autotest: make Copter tests more reliable
RTL may disarm the vehicle on completion.  We RTL at several times in
the testing, and the subsequent tests were not rearming.  This means we
had a race condition.

We now explicitly wait to be disarmed by the RTL mode, and rearm the
vehicle.

This is an interim patch until we decide whether to make each "test"
self-contained, and have a precondition of "on ground and disarmed".
2018-05-11 08:07:21 +09:00
Peter Barker
513865ae4d Tools: autotest: flake8 compliance 2018-05-09 14:23:51 +10:00
Karthik Desai
7a20dd8b73 Tools: autotest: Added a generic run_test.
This function is called from every vehicle to run a test. If any of the tests throws an exception, it will be caught here, and the name of the test and the exception that got raised will be added to the fail_list
2018-05-09 14:23:40 +10:00
Karthik Desai
b485867db3 Tools: autotest: Check if the mode exists in the dictionary 2018-05-09 14:23:35 +10:00
Karthik Desai
d26c09ccac Tools: autotest: Add and raise exceptions for wait_* helper functions 2018-05-09 14:23:26 +10:00
Peter Barker
5b03835103 Tools: autotest: correct pattern match in get_parameter 2018-04-18 20:31:55 +09:00
Peter Barker
8511c2c04b Tools: autotest: factor out apply_parameters_using_sitl
Three of our models start a SITL instance to apply parameters
then restart it so that the parameter changes can take effect.

Factor that functionality out.
2018-03-20 08:39:12 +11:00
Peter Barker
fe3b882bea Tools: autotest: move close method up to common.py 2018-03-20 08:39:12 +11:00
Peter Barker
b2cb6e196c Tools: autotest: pull common MAVProxy options into common.py 2018-03-20 08:39:12 +11:00
Peter Barker
b348cfa985 Tools: autotest: flake8 compliance
Taking the opportunity to make massive changes while we're destroying
history anyway.
2018-03-15 07:54:21 +09:00
Pierre Kancir
259dda810d Tools: use base class to share code between vehicle tests
Autotest: common.py add new base class and test

Autotest : Common add heartbeat handling on wait_mode timeout

Autotest: common.py add reach_heading_manual and reach_distance_manual

Autotest: new autotest implementation for Rover

Autotest : rover add drive_square test

Autotest: new autotest implementation for Copter

Autotest: new autotest implementation for Plane

Autotest: new autotest implementation for Sub

Autotest: new autotest implementation

Autotest: new autotest implementation for QuadPlane

Autotest : Sub disable GCS_Failsafe on autotest to prevent timeout. The failsafe aren't currently tested on Sub
2018-03-15 07:54:21 +09:00
Pierre Kancir
b3c2e134f9 Autotest: raise set_rc timeout to prevent mavproxy to miss msg on speedup 2018-03-13 08:40:05 +09:00
khancyr
fac89ed437 Tools: autotest: move common functionality to common.py
Tools: don't need to pass option on first mavproxy

Tools: reformat common.py and add commun function

Tools: use new common functions

Tools: move functions from rover to commun and reorder

Tools: add and use set_rc function with timeout

Tools: fix style for pep8
2017-12-02 22:28:22 +11:00
Peter Barker
2f76f83ab7 Tools: autotest: add and use progress function
Based on work done by khancir
(https://github.com/ArduPilot/ardupilot/pull/6360)

Tools: arduplane.py change print to progress function
Tools: quadplane.py change print to progress function
Tools: ardusub.py change print to progress function
2017-11-14 16:02:05 +11:00
Peter Barker
163b354448 Tools: autotest: rover: add test for braking 2017-10-26 14:45:19 +11:00
Peter Barker
78a0298af0 Tools: autotest.py: look at EKF flags to determine armability 2017-09-15 15:57:11 +01:00
Pierre Kancir
bec09b9a57 autotest: python3 support 2016-11-09 11:48:22 -03:00
Andrew Tridgell
fcc89a2577 autotest: fixed RC_CHANNELS_RAW -> RC_CHANNELS 2016-10-14 11:40:23 +11:00
Pierre Kancir
9e1ffcae5d Tools: update python coding style
Tools: update PrintVersion.py coding style

autotest: update python coding style

pysim: update python coding style

jsb_sim: update Python coding style

param_metadata: update Python coding style
2016-09-01 13:05:11 +10:00
Francisco Ferreira
c873524966 autotest: change wait_waypoint mode check
If we change mode while waiting for waypoints then we are no longer running the mission and should fail
2016-05-13 19:05:57 +09:00
Andrew Tridgell
6cf1fd762b autotest: don't show line noise in log download 2016-01-10 17:43:01 +11:00
Andrew Tridgell
7f89f73ad1 autotest: use simulation time for all time delays 2015-04-13 10:08:12 +10:00
Randy Mackay
9e1502e54a SITL: add wait_sim_seconds and get_sim_time 2015-04-08 12:18:18 +09:00
Andrew Tridgell
7f82397467 autotest: ensure we get the BIN flight logs even on mission failure 2014-11-13 16:31:26 +11:00
JD Russo
86baccffbd common.py: Removed timeout reset in wait_altitude
common.py:wait_altitude contained an if statement that, if the plane was changing altitude at all would reset tstart, making the timeout effectively useless. Removing this line allows wait_altitude to respect the timeout the user sets.
2014-08-07 12:40:34 +10:00
Andrew Tridgell
cc1b75ad29 autotest: restore timeout in log download
this removes the debug code now that the issue has been found (it was
an old version of pymavlink causing the problem)
2014-05-09 09:50:22 +10:00
Andrew Tridgell
73dc32108f autotest: try to debug log download timeouts 2014-05-08 17:38:49 +10:00
Andrew Tridgell
b6774b8bc7 autotest: raise the time for log download 2014-05-08 15:15:55 +10:00
Andrew Tridgell
88afd40524 autotest: increase timeout for log download 2014-02-18 21:06:53 +11:00
Andrew Tridgell
b666680d79 autotest: erase logs after downloading 2013-12-29 07:13:57 +11:00
Andrew Tridgell
6121b9c58e autotest: switched to binary log download over MAVLink 2013-12-28 21:47:12 +11:00
Randy Mackay
67c9178cc5 AutoTest: wait 1sec when saving wp 2013-11-02 21:35:00 +09:00
Andrew Tridgell
36cc266626 autotest: fixed wait_pitch() 2013-10-14 10:18:40 +11:00
Andrew Tridgell
8f558609a9 autotest: tweak plane autotest debugging 2013-10-10 09:54:20 +11:00
Randy Mackay
5f1ba85ce4 AutoTest: add copter battery failsafe test 2013-10-03 11:16:38 +09:00
Randy Mackay
c6a99ac24a AutoTest: add support for GPS glitching 2013-09-24 21:41:04 +09:00
Andrew Tridgell
81bb4f26a1 autotest: update plane test with more modes
added tests for FBWB, STABILIZE, CRUISE, ACRO and CIRCLE
2013-07-16 13:23:48 +10:00
Andrew Tridgell
21436dc1a6 autotest: fixed import of mavwp 2013-06-18 17:02:00 +10:00
Andrew Tridgell
da90dfa454 autotest: cope with existing auto mode via mode change 2013-01-14 18:03:51 +11:00
Andrew Tridgell
67afdc7485 autotest: fixes for MAVLink 1.0 in autotest 2012-04-27 15:15:53 +10:00
Andrew Tridgell
8f18d08eb5 autotest: added a lot more interal checking
check each of the sub-tests pass for overall pass
2012-02-14 11:26:42 +11:00
Jason Short
7890b784b2 Added altitude 2012-01-10 23:42:26 -08:00
Jason Short
fa2d84e557 Looking for larger than 255 numbers 2012-01-04 09:51:36 -08:00
Jason Short
5038fcecd8 Added more detail 2011-12-23 14:42:49 -08:00