You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
1.0 KiB
1.0 KiB
单元测试
QGroundControl (QGC) contains a set of unit tests that must pass before a pull request will be accepted. 向QGC添加新的复杂子系统应该有相应的新单元测试来测试它。
单元测试的完整列表可以在UnitTestList.cc中找到。
要运行单元测试:
- 使用UNITTEST_BUILD定义在调试模式下构建。
- 复制debug目录中的deploy / qgroundcontrol-start.sh脚本
- Run all unit tests from the command line using the
--unittest
command line option. For Linux this is done as shown:使用--unittest命令行选项从命令行运行所有单元测试。 对于Linux,这是完成如下所示: `qgroundcontrol-start.sh --unittest`
- Run individual unit tests by specifying the test name as well:
--unittest:RadioConfigTest
. For Linux this is done as shown:通过指定测试名称来运行单个单元测试: - unittest:RadioConfigTest。 对于Linux,这是完成如下所示: `qgroundcontrol-start.sh --unittest:RadioConfigTest`