make: lcov ignore mismatch errors

Signed-off-by: Ramon Roche <mrpollo@gmail.com>
This commit is contained in:
Ramon Roche 2025-06-17 13:26:54 -07:00 committed by Beat Küng
parent 6bd66d50e9
commit f01e589010

View File

@ -410,11 +410,18 @@ tests:
$(eval UBSAN_OPTIONS += color=always)
$(call cmake-build,px4_sitl_test)
# work around lcov bug #316; remove once lcov is fixed (see https://github.com/linux-test-project/lcov/issues/316)
LCOBUG = --ignore-errors mismatch
tests_coverage:
@$(MAKE) clean
@$(MAKE) --no-print-directory tests PX4_CMAKE_BUILD_TYPE=Coverage
@mkdir -p coverage
@lcov --directory build/px4_sitl_test --base-directory build/px4_sitl_test --gcov-tool gcov --capture -o coverage/lcov.info
@lcov --directory build/px4_sitl_test \
--base-directory build/px4_sitl_test \
--gcov-tool gcov \
--capture \
$(LCOBUG) \
-o coverage/lcov.info
rostest: px4_sitl_default