From f01e5890107254987305d3bfb9088f63631d8c55 Mon Sep 17 00:00:00 2001 From: Ramon Roche Date: Tue, 17 Jun 2025 13:26:54 -0700 Subject: [PATCH] make: lcov ignore mismatch errors Signed-off-by: Ramon Roche --- Makefile | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 304f90edaf..fef748948d 100644 --- a/Makefile +++ b/Makefile @@ -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