Commit Graph

31281 Commits

Author SHA1 Message Date
Lorenz Meier eda1459140
Add access token to SITL test Github Action
This is needed for downstream adopters. We want them to re-use our CI tests so that contributions already are pre-tested when they are submitted.
2019-12-26 12:59:09 +01:00
Lorenz Meier 77951c1e07
Add access token to NuttX Github Action
This is necessary for downstream adopters. We want them to run these actions as well so that contributions are already pre-tested.
2019-12-26 12:57:58 +01:00
Lorenz Meier 993938c0b1
Add access token to C++ build test
This is necessary for downstream adopters.
2019-12-26 12:57:08 +01:00
Lorenz Meier d86a308f76
Add access token to build_tests.yml (#13789)
Add access token to build_tests.yml

This is necessary to enable GH Actions for downstream adopters. This also enables the explicit submodule checkout.
2019-12-26 12:54:56 +01:00
Matthias Grob ffff35a597 Unit tests: use EXPECT_FLOAT_EQ for float comparisons
as precaution to prevent failing tests because of small potential
rounding errors on certain platforms or compilares.
2019-12-26 12:53:07 +01:00
Matthias Grob ee62d0296f ControlMathTest: consistent short float literal notation 2019-12-26 12:53:07 +01:00
Matthias Grob ad148fdfad ControlMathTest: switch back to direct EXPECT_EQ calls for Vectors
Since the google test calls matrix::operator==()
which calls matrix::isEqual().
2019-12-26 12:53:07 +01:00
JaeyoungLim d5100b10dc Update comments 2019-12-26 12:03:32 +01:00
RomanBapst eeb47f6148 gazebo multiple sim script: cleanup
- make sure to kill all px4 instances and gazebo client when exiting
- add arguments to specify number of vehicles and vehicle model
- exit for now if vehicle model is not iris, since needs changes in
sitl_gazebo submodule

Signed-off-by: RomanBapst <bapstroman@gmail.com>
2019-12-26 12:03:32 +01:00
JaeyoungLim 876f42c171 Source environment inside the script 2019-12-26 12:03:32 +01:00
JaeyoungLim 155a212109 Update comments 2019-12-26 12:03:32 +01:00
JaeyoungLim f653be75c0 gazebo multiple sim: use xacro from the sitl_gazebo repository
Signed-off-by: RomanBapst <bapstroman@gmail.com>
2019-12-26 12:03:32 +01:00
JaeyoungLim 0b649326c3 Support multi vehicle sitl gazebo without ros 2019-12-26 12:03:32 +01:00
Lorenz Meier aaf033044d GH Actions: Only build on push
This still captures all commits, but does not cover the merged state of the PR. All PRs need to be up-to-date before merging/rebasing, which is better practice anyway.
2019-12-26 10:16:58 +01:00
Lorenz Meier adf7aee762 Harden autostart logic for non-existent airframe values
This ensures that the user is pushed back to the airframe configuration stage.
2019-12-26 10:16:58 +01:00
Lorenz Meier f5ce40e434 FMUv2: Exclude some multicopter targets
These are rarely used airframes that should not be missed.
2019-12-26 10:16:58 +01:00
Lorenz Meier 0c85c5d18e FMUv2: Exclude some fixed wing targets
These are rarely used airframes that should not be missed.
2019-12-26 10:16:58 +01:00
Lorenz Meier 02119c1832 FMUv2: Exclude rover targets
This is reasonable as these boards are very old and rovers are a new area of activity.
2019-12-26 10:16:58 +01:00
Lorenz Meier be35c4857b SITL shell: Do math using the shell
Bash or zsh from the last 10 years or so do math using the $((a + b)) syntax. This saves us from having bc as dependency.
2019-12-26 10:16:58 +01:00
Lorenz Meier 26d01b876c GH Actions: Enable grind option
This allows to run the script in grind mode to find CI failures that are triggered through e.g. race conditions.
2019-12-26 10:16:58 +01:00
Lorenz Meier 73edc21667 Tests: Add further instrumentation 2019-12-26 10:16:58 +01:00
Lorenz Meier 1834c156d2 Simulator: Remove EKF2 based wait
This is cleaner and needs testing.
2019-12-26 10:16:58 +01:00
Lorenz Meier 742b1839d5 Simulation: Set scheduling policy RR for lockstep
This should ensure that all processes do still run at full load.
2019-12-26 10:16:58 +01:00
Lorenz Meier 663436fd47 Integration tests: Add Makefile target
This enables unfamiliar users to run the tests quickly without having to memorize all commandsline options.
2019-12-26 10:16:58 +01:00
Lorenz Meier cd75cc08d3 Add baseline SITL environment via Github actions 2019-12-26 10:16:58 +01:00
Julian Oes 81809d8234 ROMFS: prevent high accel bias in SITL 2019-12-26 10:16:58 +01:00
Julian Oes 3a228622b9 mavsdk_tests: fix verbose output 2019-12-26 10:16:58 +01:00
Julian Oes 16da8466e3 posix: exit if the startup script is not ok
In general, if anything goes wrong in the startup script, we
should fail entirely because things might not work as expected.

In particular, this prevents that we have to press Ctrl+C twice if the
simulator start call is hung waiting for the simulator to appear and
start communicating. We now press Ctrl+C once and exit straightaway
whereas before we would press it once to get the warning:
"Startup script returned with return value: 2",
and then finally exit on the second press.
2019-12-26 10:16:58 +01:00
Julian Oes 8817f172ea simulator: cleanup and wait for startup
Unfortunately this commit contains two things:
1. Some cleanup and renaiming.
2. An additional wait until lockstep has been initialized.
   By waiting until HIL_SENSOR messages arrive including timestamps we
   stop the startup script and prevent other modules from running until
   time is set up. This should resolve some busy waiting by various
   modules and prevent races on initialization (e.g. the landing state
   being subscribed by mavlink before being published by the land
   detector).
2019-12-26 10:16:58 +01:00
Julian Oes 99fbadac70 mavsdk_tests: remove output to logfile for now 2019-12-26 10:16:58 +01:00
Julian Oes 6e0cb7859e mavsdk_tests: add option for gzclient GUI 2019-12-26 10:16:58 +01:00
Julian Oes 698731e4f5 mavsdk_tests: don't use SIGINT, just terminate 2019-12-26 10:16:58 +01:00
Julian Oes f5cc6b7dcf mavsdk_tests: end the logfiles with .log 2019-12-26 10:16:58 +01:00
Julian Oes d32e3919dd mavsdk_tests: return error if not ready 2019-12-26 10:16:58 +01:00
Julian Oes b6e6d66616 mavsdk_tests: env vars need to be strings 2019-12-26 10:16:58 +01:00
Julian Oes 7ff4bd8289 mavsdk_tests: use subprocess instead of sys stdout 2019-12-26 10:16:58 +01:00
Julian Oes eef57f93ae mavsdk_tests: fix bugs in readyness checks 2019-12-26 10:16:58 +01:00
Julian Oes 580ea06fb7 mavsdk_tests: restart SITL after each test case 2019-12-26 10:16:58 +01:00
Julian Oes c363a15ad8 mavsdk_tests: enable VTOL tests as well 2019-12-26 10:16:58 +01:00
Julian Oes cc249f980b mavsdk_tests: check if build everything is built 2019-12-26 10:16:58 +01:00
Julian Oes 0a3152786b mavsdk_tests: use SIGINT before SIGTERM 2019-12-26 10:16:58 +01:00
Julian Oes 79a4bde155 mavsdk_tests: rename C++ executable
The executable contains all tests, so the name was a poor choice.
2019-12-26 10:16:58 +01:00
Julian Oes 90c79493f2 mavsdk_tests: print overall result 2019-12-26 10:16:58 +01:00
Julian Oes dde7530df6 mavsdk_tests: properly handle timeout 2019-12-26 10:16:58 +01:00
Julian Oes ce9aa119ff mavsdk_tests: option for speed factor
And we also need to communicate the speed factor for the px4 executable,
otherwise it can't adapt the timeouts accordingly.
2019-12-26 10:16:58 +01:00
Julian Oes 22bac037ed mavsdk_tests: better process management
We now error if px4 or gzserver are already running on startup, and we
also make sure to terminate what we started if interrupted.
2019-12-26 10:16:58 +01:00
Julian Oes 2bbe4dac25 mavsdk_tests: run test runner, speed up sim 2019-12-26 10:16:58 +01:00
Julian Oes 728a0b033e mavsdk_tests: add termination/kill, custom log dir 2019-12-26 10:16:58 +01:00
Julian Oes 09d63f5531 mavsdk_tests: added test runner 2019-12-26 10:16:58 +01:00
Julian Oes 956bd1b7b1 Move mavsdk_tests into test 2019-12-26 10:16:58 +01:00