Commit Graph

71 Commits

Author SHA1 Message Date
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
Pierre Kancir bec09b9a57 autotest: python3 support 2016-11-09 11:48:22 -03:00
Pierre Kancir 5786d66ea1 autotest: simplify start_sitl 2016-11-09 11:48:22 -03: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
Lucas De Marchi f0590581e4 autotest: standardize name of param files
Try to make the various param files to follow similar namings:

    - Lowercase the few ones using uppercase
    - Use dash to separate name components
    - Start with "copter", "plane", "rover", etc instead of the mix we
      had
    - Remove "params" from the filename since it's redundant with the
      extension
2016-08-08 10:12:14 -03:00
Pierre Kancir 19d94737a0 autotest: move all default params to default_params directory 2016-08-03 17:44:37 -03:00
Andrew Tridgell 3489f7b576 autotest: use builtin plane sim for autotest
and simplify startup using defaults file
2016-07-22 16:42:46 +10:00
priseborough e0d87bf529 autotest: Increase startup wait time to allow EKF and GPS checks to pass 2016-07-19 12:16:48 +10:00
Peter Barker b23f983459 autotest: add --gdb option to autotest.py 2016-06-27 18:14:55 -03:00
Andrew Tridgell 084a37d4fa autotest: enable LOG_REPLAY and LOG_DISARMED in autotest
this will give us the ability to analyse any EKF errors
2016-05-27 21:23:39 +10:00
Peter Barker 3548f90d3a autotest: create SIL object to hold valgrind logpath 2016-05-27 08:07:07 -03:00
Peter Barker 7b86a05722 Tools: convert autotest build.X and fly.X to use waf build system 2016-05-27 08:07:07 -03:00
Peter Barker 8774f15b9a Tools: add valgrind option to autotest.py 2016-04-22 09:42:33 +10:00
Andrew Tridgell 084b607862 autotest: updated string for "Flight plan received" 2015-11-26 12:52:19 +11:00
Andrew Tridgell 34689cf949 autotest: cope with mavproxy logging msg changes 2015-06-30 14:06:17 +10:00
Andrew Tridgell aaff670ec4 autotest: use builtin JSBSim support for plane testing 2015-05-11 08:06:31 +10:00
Andrew Tridgell d4e9418ad4 autotest: rename jsmsim folder to jsb_sim
this prevents problems on windows with virtualbox. It tries to run
JSBSim as the directory 'jsbsim' and fails
2015-04-14 09:04:11 +10:00
Andrew Tridgell 7f89f73ad1 autotest: use simulation time for all time delays 2015-04-13 10:08:12 +10:00
Andrew Tridgell d2a188c55d autotest: run plane test at maximum speed 2015-04-13 10:08:12 +10:00
Andrew Tridgell 0ea0b51ccd autotest: start plane sim during initial parameter load
this is now needed to get timestamps from JSBSim
2015-03-24 08:06:50 -07:00
Andrew Tridgell b4ce3e0ba5 autotest: lock in the altitude before the FBWB test 2015-01-22 11:33:25 +11:00
Andrew Tridgell c1f9be75fe autotest: fly the cruise rudder circuit a bit faster 2014-02-24 12:08:33 +11:00
Andrew Tridgell ccc449db19 autotest: removed the set of SYSID_THISMAV
this led to a race condition where some parameters were not loaded as
they were being sent with the wrong system ID
2014-02-18 15:51:25 +11:00
Andrew Tridgell 29c818ec6f autotest: re-fetch parms after loading
trying to debug an autotest issue
2014-02-17 13:58:11 +11:00
Andrew Tridgell 0d6e8e9c0d autotest: fixed timeout waiting for LOITER 2014-02-17 13:58:11 +11:00
Andrew Tridgell 6121b9c58e autotest: switched to binary log download over MAVLink 2013-12-28 21:47:12 +11:00
Andrew Tridgell c6cbfdce9a autotest: report initial and final altitude in alt hold tests 2013-10-17 17:22:19 +11:00
Andrew Tridgell 8f558609a9 autotest: tweak plane autotest debugging 2013-10-10 09:54:20 +11:00
Andrew Tridgell ef104b6629 autotest: wait for a higher altitude on takeoff
otherwise left circuit can crash
2013-07-22 13:27:06 +10: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 2802814a66 autotest: cope with slower updating roll in MAVLink for plane
need less precision in horizontal roll test
2013-07-15 13:11:41 +10:00
Andrew Tridgell 93db4a4a5b autotest: consider lack of symlinks to be a soft error
some people use VMWare shared drives, which don't do hard links
2013-06-24 13:06:54 +10:00
Andrew Tridgell 21436dc1a6 autotest: fixed import of mavwp 2013-06-18 17:02:00 +10:00
Andrew Tridgell 2cb28076c8 autotest: tweak plane autotest mission and parameters
a bit better with the new controllers
2013-05-31 15:31:59 +10:00
Andrew Tridgell 168f76e76c autotest: added --map option to autotest.py 2013-05-02 20:07:04 +10:00
Andrew Tridgell 9904bcd9aa autotest: changed mavlink log names to *.tlog
easier to view in MP
2013-04-28 15:01:31 +10:00
Andrew Tridgell 843692ee5d autotest: more tweaks to Rascal parameters 2013-01-16 15:16:26 +11:00
Andrew Tridgell 71f8166818 autotest: fix a race condition with baro noise on startup
we need to wait for a full GPS fix
2012-11-19 11:56:46 +11:00
Andrew Tridgell a9af6e95cb APM: higher throttle on takeoff in ArduPlane autotest 2012-08-30 07:37:26 +10:00
Andrew Tridgell 681e67201d APM: fixed orientation on runway in autotest 2012-08-29 17:17:38 +10:00
Andrew Tridgell 51247ad6c1 autotest: loiter can be a bit slow to circle sometimes 2012-08-27 13:19:21 +10:00
Andrew Tridgell c1405bddb3 APM-autotest: fixed inside loop test
pitch 80 may not be reached due to granularity of the MAVLink logging
2012-08-27 11:45:07 +10:00