Unit Tests
QGroundControl (QGC) contains a set of unit tests that must pass before a pull request will be accepted. The addition of new complex subsystems to QGC should include a corresponding new unit test to test it.
The full list of unit tests can be found in UnitTestList.cc.
To run unit tests:
- Build in
debug
mode withUNITTEST_BUILD
definition. - Copy the deploy/qgroundcontrol-start.sh script in the debug directory
- Run all unit tests from the command line using the
--unittest
command line option. For Linux this is done as shown:qgroundcontrol-start.sh --unittest
- Run individual unit tests by specifying the test name as well:
--unittest:RadioConfigTest
. For Linux this is done as shown:qgroundcontrol-start.sh --unittest:RadioConfigTest