summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Schmidt <stefan@osg.samsung.com>2016-03-02 09:07:41 +0100
committerStefan Schmidt <stefan@osg.samsung.com>2016-03-02 09:13:19 +0100
commitc20d34a8007c527d1a9531976aaae2e93eea1590 (patch)
tree28c09693dd6adb38e7136f716dd800c1cd2fee72
parentc5450225832b0d9460acec62521dc3a8ac1680fd (diff)
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 like this: genhtml: ERROR: cannot read /srv/build/workspace/manual_elm_gcc_x86_64_exactness_coverage/src/lib/test_win_state.c Where the file is simply looked for in the wrong directory.
-rw-r--r--.lcov-config1
-rw-r--r--Makefile.am2
2 files changed, 2 insertions, 1 deletions
diff --git a/.lcov-config b/.lcov-config
new file mode 100644
index 000000000..bb631ac58
--- /dev/null
+++ b/.lcov-config
@@ -0,0 +1 @@
geninfo_auto_base = 1
diff --git a/Makefile.am b/Makefile.am
index 3ab56f4d1..334062299 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -134,7 +134,7 @@ lcov-reset:
134 134
135lcov-report: 135lcov-report:
136 @mkdir $(top_builddir)/coverage 136 @mkdir $(top_builddir)/coverage
137 lcov --capture --compat-libtool --no-external --output-file $(top_builddir)/coverage/coverage.info --directory $(top_builddir) --base-directory $(top_srcdir)/src/lib/ 137 lcov --capture --compat-libtool --no-external --config-file .lcov-config --output-file $(top_builddir)/coverage/coverage.info --directory $(top_builddir)
138 lcov --remove $(top_builddir)/coverage/coverage.info '*.h' --output-file $(top_builddir)/coverage/coverage.cleaned.info 138 lcov --remove $(top_builddir)/coverage/coverage.info '*.h' --output-file $(top_builddir)/coverage/coverage.cleaned.info
139 lcov --remove $(top_builddir)/coverage/coverage.cleaned.info '*/elm_test_*' --output-file $(top_builddir)/coverage/coverage.cleaned2.info 139 lcov --remove $(top_builddir)/coverage/coverage.cleaned.info '*/elm_test_*' --output-file $(top_builddir)/coverage/coverage.cleaned2.info
140 lcov --remove $(top_builddir)/coverage/coverage.cleaned2.info '*/elm_suite.c' --output-file $(top_builddir)/coverage/coverage.cleaned3.info 140 lcov --remove $(top_builddir)/coverage/coverage.cleaned2.info '*/elm_suite.c' --output-file $(top_builddir)/coverage/coverage.cleaned3.info