Module: check_mk
Branch: master
Commit: ead9c0f065f4610b8cbd34ed660be6c01c70d43d
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=ead9c0f065f461…
Author: Jukka Aro <ja(a)mathias-kettner.de>
Date: Thu Apr 19 09:05:25 2018 +0200
Win-agent: ensure regeneration of gcov coverage
Clean old gcda files as gcov does not guarantee to overwrite them.
This is relevant at least when we only change tests but not the source
under testing: otherwise gcov may not reproduce the coverage correctly
after the changes.
---
agents/windows/Makefile.am | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/agents/windows/Makefile.am b/agents/windows/Makefile.am
index 7af9563..7547084 100644
--- a/agents/windows/Makefile.am
+++ b/agents/windows/Makefile.am
@@ -65,7 +65,11 @@ integrationtest: install-strip
fi ; \
cd -
-coverage.info: WindowsAgentCoverage$(EXEEXT)
+# Force regeneration of coverage data during test run.
+clean-coverage:
+ rm -f $$(find . -name "*.gcda")
+
+coverage.info: WindowsAgentCoverage$(EXEEXT) clean-coverage
DISPLAY="$$DISPLAY xterm" wine $< 2>/dev/null ; \
lcov -c --rc lcov_branch_coverage=1 --directory . -o $@