Commit Graph

104 Commits

Author SHA1 Message Date
Pierre Kancir
8a7555bf56 Tools: autotest: fix up the arming tests
Tools: unify arm function failure message

Tools: get autodisarm time from parameter for autodisarm test

Tools: disable autodisarm for arm/disarm tests.

Tools: fix interlock channel for heli

Tools: simplify arming_test sub exclusion

Tools: fix empty string in progress

Tools: add back arming test to plane

Tools: allow single test run on Sub

Tools: remove old comments on autotest common

Tools: add vehicle type getter function

Tools: make get_rudder_channel abstract method

Tools: common make get_disarm_delay abstract method

Tools: make set_autodisarm_delay abstract method

Tools: rename set_throttle_zero to zero_throttle and use it

Tools: common.py remove unnecessary exception

Tools: subclass vehicle type
2019-02-09 10:04:57 +11:00
Peter Barker
584013de58 Tools: autotest: correct debug for precision 2019-02-07 08:50:08 +11:00
Peter Barker
657e1bee5a Tools: autotest: use absolute path for rover avoidance fence
This stops us making the assumption MAVProxy's cwd is the ArduPilot git
root
2019-02-06 09:32:10 +11:00
Peter Barker
fa37ad344b Tools: autotest: refactor setting of rc defaults 2019-02-04 08:00:07 +11:00
Peter Barker
2834fd8017 Tools: autotest: add test for channel override cancel 2019-02-01 11:48:01 +11:00
Peter Barker
7aa1d51585 Tools: autotest: move balancebot to new tests structure 2018-12-18 10:06:09 +11:00
cclauss
89be497897 Tools: Undefined name: 'AutoTestTimeoutException'
[flake8](http://flake8.pycqa.org) testing of https://github.com/ArduPilot/ardupilot on Python 3.7.1

$ __flake8 . --count --select=E901,E999,F821,F822,F823 --show-source --statistics__
```
./Tools/autotest/apmrover2.py:688:27: F821 undefined name 'AutoTestTimeoutException'
                    raise AutoTestTimeoutException("Did not reach speed")
                          ^
./Tools/autotest/apmrover2.py:717:27: F821 undefined name 'AutoTestTimeoutException'
                    raise AutoTestTimeoutException("Did not stop")
                          ^
2     F821 undefined name 'AutoTestTimeoutException'
2
```
2018-12-17 17:53:22 +00:00
Peter Barker
28b0267b6c Tools: autotest: add timeout on Rover test_rc_overrides 2018-12-15 21:38:48 +11:00
Peter Barker
686bfc367e Tools: autotest: tee MAVProxy output to per-test file 2018-12-15 17:11:44 +11:00
Peter Barker
9eae7857dd Tools: autotest: make Rover use new tests framework 2018-12-15 10:02:11 +11:00
Peter Barker
10c27e07d4 Tools: autotest: make aux switch test more reliable 2018-12-15 10:02:11 +11:00
Peter Barker
31d6daa1ae Tools: auotest: add test to ensure components are accepted if SYSID_ENFORCE 2018-12-14 12:44:31 +11:00
Peter Barker
da1f04e78c Tools: autotest: add a test for SYSID_ENFORCE 2018-12-14 12:44:31 +11:00
Peter Barker
e6c30f6405 Tools: autotest: use change_mode in apmrover2 for changing modes 2018-12-14 11:10:41 +11:00
Peter Barker
a320a54f66 Tools: autotest: new wait_heartbeat raises exception if none received 2018-12-14 11:10:41 +11:00
Peter Barker
984ce514a7 Tools: autotest: make Rover tests stand-alone 2018-12-12 13:46:27 +11:00
Peter Barker
0d34052cef Tools: autotest: move code up 2018-12-10 12:52:41 +09:00
Peter Barker
aff81d6f76 Tools: autotest: add test for SET_MESSAGE_INTERVAL 2018-12-10 12:52:41 +09:00
Peter Barker
88a003edd9 Tools: autotest: flake8 compliance 2018-11-24 08:30:02 +11:00
Peter Barker
f84370bb04 Tools: autotest: consolidate mission-loading functions
Also add sanity checks for mission loading

Tools: autotest: add missing import for arduplane.py
2018-11-16 10:06:25 +11:00
Andrew Tridgell
6b5088207b autotest: upload failed CI logs to autotest server 2018-11-10 21:23:02 +11:00
Peter Barker
f290a72d9c Tools: autotest: add test for camera trigger distance 2018-10-30 15:37:18 +11:00
Peter Barker
bb5aa4d195 Tools: add test for proximity avoidance switch 2018-10-30 12:10:42 +11:00
Peter Barker
a66cc52573 Tools: autotest: provide description of exceptions in constructors 2018-10-19 08:52:44 +11:00
Pierre Kancir
55f4be0515 Tools: make do_set_mode function more generic 2018-10-03 16:57:01 +10:00
Peter Barker
af510801f1 Tools: autotest: use RC_CHANNELS rather than RC_CHANNELS_RAW 2018-09-12 10:06:36 +10:00
Peter Barker
6e44ea13d4 Tools: autotest: do not arm vehicle before flaps test 2018-09-07 23:18:43 +10:00
Pierre Kancir
d8c53bbd9c Tools: remove dependency on mavproxy for cmd_long based functions 2018-09-07 11:20:03 +10:00
Peter Barker
5d317a8ef7 Tools: autotest: clear Rover waypoints before toggling them in 2018-09-06 15:29:28 +10:00
Peter Barker
197edca772 Tools: expand test to cover use of disable-gcs-rc-overrides switch 2018-09-05 11:54:32 +10:00
Peter Barker
5c7e21d38f Tools: autotest: add test for clearing waypoints 2018-09-04 10:32:26 +10:00
Pierre Kancir
f6cc934678 Tools: pep8 corrections + correct variable shadowing 2018-08-27 17:08:47 +10:00
Pierre Kancir
cc8aca1619 Tools: various fixes for Copter tests
Tools: correct altitude check

Tools: correct tests syntax

Tools: add autotest syntax check on common

Tools: search for syntax mistake on autotest lambda

Tools: put copter in hover trottle to prevent crash

Tools: reboot after baterry failsafe test

Tools: copter takeoff wait_ready_to_arm before arming

Tools: arm copter after land on RTL

Tools: reset copter battery voltage after battery failsafe
2018-08-21 20:41:09 +10:00
Peter Barker
2a174a5dac Tools: add test for Sprayer-on-Rover 2018-08-17 15:33:35 +09:00
Peter Barker
0f7c837d2d Tools: autotest: increase timeout for RTL test
BalanceBot is slow!
2018-08-16 16:06:00 +10:00
Peter Barker
4c89fa4b75 Tools: autotest: add tests for changing modes via MAVProxy mode command 2018-08-16 16:05:19 +10:00
Pierre Kancir
2f9f793ccf Tools: add arm and disarm tests 2018-08-15 16:38:20 +10:00
Peter Barker
af37e10126 Tools: autotest: factor out starting of our our mavlink connection 2018-08-04 10:07:22 +10:00
Peter Barker
dab93750a0 Tools: add test for rc overrides 2018-08-03 13:07:50 +10:00
Pierre Kancir
a930822d9d Tools: unify exception on os.link 2018-08-03 08:40:33 +10:00
Andrew Tridgell
6090820bdc autotest: disable the Drive Brake test in rover
this test fails far too often
2018-08-01 14:03:26 +10:00
Peter Barker
b8030816b8 Tools: autotest: add tests for mode changes for Copter and Rover 2018-08-01 12:11:30 +09:00
Michael du Breuil
90216f7cb6 Tools: Slow rover test down for CI, remove unneeded variable 2018-08-01 09:19:20 +10:00
Peter Barker
6dd8dbeb40 Tools: autotest: add ability to add breakpoints in autotest 2018-07-27 09:58:15 +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
513865ae4d Tools: autotest: flake8 compliance 2018-05-09 14:23:51 +10:00
Karthik Desai
40cd0cd17f Tools: autotest: Use the generic run_test.
If any of the tests throws an exception, it will be caught by the generic test function
that collects all errors and displays them before passing the result to the vehicle testcode.
Hence the name of the test and the exception that got raised get printed in a single
location. This nicely reduces code duplication.
2018-05-09 14:23:45 +10:00
Peter Barker
802e4c6315 Tools: autotest: add tests for relays 2018-04-18 20:31:55 +09:00
Karthik Desai
9de1813ae6 Autotest: Fix a race condition on the regression tests on Windows 2018-03-23 09:13:37 +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