Commit Graph

112 Commits

Author SHA1 Message Date
Francisco Ferreira b2523021fb Tools: autotest: increase Plane log download timeout 2019-02-22 08:27:08 +11:00
Pierre Kancir 7e12f16be6 Tools: fix lambda test 2019-02-22 08:04:03 +11:00
Peter Barker c0394e9577 Tools: autotest: tidy handling of SITL start position 2019-02-16 19:14:48 +11:00
Peter Barker effeebfeb8 Tools: autotest: skip failing RC test until code is fixed 2019-02-14 11:49:59 +11:00
Peter Barker e3368e193d Tools: autotest: add test for throttle failsafe 2019-02-14 11:49:59 +11:00
Peter Barker a1aefaff27 Tools: autotest: add parachute tests
Tools: autotest: add test for triggering parachute via mavlink

Tools: autotest: add Copter mission test for parachute release

Tools: autotest: add Plane test for parachute deployment in auto
2019-02-13 09:25:27 +09:00
Peter Barker 6f1f98dc3c Tools: autotest: add assumption run_tests is only called once - remove hasInit 2019-02-09 11:31:17 +11:00
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 fa37ad344b Tools: autotest: refactor setting of rc defaults 2019-02-04 08:00:07 +11:00
Peter Barker 55f751a8f4 Tools: autotest: add some tests for Copter parachute functions 2019-01-09 13:16:03 +11:00
Peter Barker 622549456c Tools: autotest: convert plane over to new tests structure 2018-12-18 10:06:09 +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 dd88e6e85c Tools: autotest: correct wait_servo_channel_value error path
Also make flaps test a little more verbose
2018-11-29 09:48:31 +11: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 dc6a03f5e0 Plane: mission library handles gripper 2018-10-30 15:37:18 +11:00
Peter Barker 2157999307 Tools: autotest: add tests for gripper mission items 2018-10-30 15:37:18 +11:00
Peter Barker a66cc52573 Tools: autotest: provide description of exceptions in constructors 2018-10-19 08:52:44 +11:00
Peter Barker 40ac2e493d Tools: add a test for Plane's SET_ATTITUDE_TARGET support 2018-10-16 13:39:26 +11:00
Peter Barker a7042e3847 Tools: autotest: tweak output messages, loosen camera trigger timeout 2018-09-08 12:56:15 +10:00
Peter Barker 6e44ea13d4 Tools: autotest: do not arm vehicle before flaps test 2018-09-07 23:18:43 +10:00
Peter Barker 56646651c6 Tools: autotest: add test for RCn_OPTION - camera trigger 2018-09-05 13:47:19 +10:00
Peter Barker f47823f4e4 Tools: autotest: add test for RCn_OPTION - toggling relays 2018-09-05 13:47:19 +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
Pierre Kancir 2f9f793ccf Tools: add arm and disarm tests 2018-08-15 16:38:20 +10:00
Peter Barker 8e3b69bca0 Tools: autotest: add flaps test 2018-08-15 10:16:13 +10:00
Pierre Kancir a8ea84a729 Tools: autotest: clean function arguments 2018-08-15 10:16:13 +10:00
Peter Barker af37e10126 Tools: autotest: factor out starting of our our mavlink connection 2018-08-04 10:07:22 +10:00
Pierre Kancir a930822d9d Tools: unify exception on os.link 2018-08-03 08:40:33 +10: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 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
Karthik Desai 9de1813ae6 Autotest: Fix a race condition on the regression tests on Windows 2018-03-23 09:13:37 +09: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
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
Dr.-Ing. Amilcar Do Carmo Lucas 5c07a44a6d Tools: Fix a race condition on the regression tests on Windows
Added \r\n to the expect() string as recomended at:
http://pexpect.readthedocs.io/en/stable/overview.html#find-the-end-of-line-cr-lf-conventions
this should work on both windows and linux systems

pexpect says it will always do a minimal (non greedy) matching and docs explicitly say that a .+ expression will always return only one character. These lines in autotest are looking for \S+, which, believing the documentation, would only return one character of the log file path.
Now we know that's not true, neither for Linux or for Windows (given the logs from @karthikdesai), so I can only assume that it does a greedy match but only for the characters it has received at the time expect is called.
Apparently, in the machines we are using autotest, it isn't a problem since MAVProxy is likely fast to give its output to pexpect before the expect method is called. On @karthikdesai's machine that wasn't happening since his machine was more or less loaded.
Concluding, this looks like a correct fix in the sense that it extends the regex pattern to wait for the end of line (and probably other places could benefit from it too).
2017-11-22 17:01:05 +09: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
Pierre Kancir 76bb081d60 Tools: autotest: add python headers to scripts
Tools: arduplane.py add python header

Tools: apmrover2.py add python header

Tools: arducopter.py add python header

Tools: ardusub.py add python header

Tools: quadplane.py add python header
2017-11-14 14:47:32 +11:00
Peter Barker 78a0298af0 Tools: autotest.py: look at EKF flags to determine armability 2017-09-15 15:57:11 +01:00
Peter Barker 1b7122d733 Tools: add a --speedup parameter to autotest to control speed of all sims 2017-08-29 22:49:40 +01:00
Miguel Arroyo 38297c4d19 Tools: Adds GDBServer with screen option for debugging 2017-08-24 21:37:06 +10:00
Peter Barker 34e611be59 Tools: autotest: wait for plane to disarm before downloading logs 2017-06-27 03:10:43 +01:00
Peter Barker 817efe9b6d Tools: expect message for EKF readiness rather than sleeping
This solves a problem for me when running Valgrind as
30s was not sufficient
2017-01-26 16:53:13 +11:00