build: fix problems with coverage check build where some files are not found

Switch to use a lcov config file which geninfo_auto_base and remove hard coding
the base dir  to src/lib. geninfo_auto_base is designed for a use case like
ours where we have several base dirs (lib, bin, tests, ...) and it detects them
automatically. This fixes failures in a coverage run where the file is simply
looked for in the wrong directory.
This commit is contained in:
Stefan Schmidt 2016-03-02 13:14:00 +01:00
parent 09d0b53b94
commit 7c79165b53
2 changed files with 2 additions and 1 deletions

1
.lcov-config Normal file
View File

@ -0,0 +1 @@
geninfo_auto_base = 1

View File

@ -430,7 +430,7 @@ lcov-reset:
lcov-report:
$(MKDIR_P) $(top_builddir)/coverage
lcov --capture --compat-libtool --no-external --output-file $(top_builddir)/coverage/coverage.info --directory $(top_builddir) --base-directory $(top_srcdir)/src/
lcov --capture --compat-libtool --no-external --config-file .lcov-config --output-file $(top_builddir)/coverage/coverage.info --directory $(top_builddir)
lcov --remove $(top_builddir)/coverage/coverage.info '*.h' --output-file $(top_builddir)/coverage/coverage.cleaned.info
lcov --remove $(top_builddir)/coverage/coverage.cleaned.info '*/tests/*' --output-file $(top_builddir)/coverage/coverage.cleaned2.info
lcov --remove $(top_builddir)/coverage/coverage.cleaned2.info '*NONE*' --output-file $(top_builddir)/coverage/coverage.cleaned3.info