Commit 127bae3d authored by Tristan Matthews's avatar Tristan Matthews

* #20736: daemon: added --enable-coverage option and make targets

To get code coverage metrics, run
./configure --enable-coverage
make
make check
make coverage
parent 6c954fd1
......@@ -26,3 +26,16 @@ EXTRA_DIST = m4/libtool.m4 \
m4/ltoptions.m4 \
m4/ltsugar.m4 \
m4/ltversion.m4
coverage:
$(AM_V_at)lcov --directory $(top_builddir) --capture --output-file sflphone-coverage.info
$(MKDIR_P) html-output
genhtml -o html-output sflphone-coverage.info
coverage-clean:
$(AM_V_at)lcov --directory $(top_builddir) --zerocounters
$(AM_V_at)rm -rf sflphone-coverage.info
$(AM_V_at)find -name '*.gcda' -exec rm -f {} +
$(AM_V_at)find -name '*.gcno' -exec rm -f {} +
.PHONY: coverage coverage-clean
......@@ -94,6 +94,12 @@ dnl Check for the samplerate development package - name: libsamplerate0-dev
LIBSAMPLERATE_MIN_VERSION=0.1.2
PKG_CHECK_MODULES(SAMPLERATE, samplerate >= ${LIBSAMPLERATE_MIN_VERSION},, AC_MSG_ERROR([Missing libsamplerate development package: libsamplerate0-dev]))
dnl Coverage is default-disabled
AC_ARG_ENABLE([coverage], AS_HELP_STRING([--enable-coverage], [Enable coverage]))
AS_IF([test "x$enable_coverage" = "xyes"], [
CXXFLAGS="${CXXFLAGS} -fprofile-arcs -ftest-coverage"
LDFLAGS="${LDFLAGS} -fprofile-arcs -ftest-coverage"])
dnl Video is default-disabled
AC_ARG_ENABLE([video], AS_HELP_STRING([--enable-video], [Enable video]))
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment