Unverified Commit c98c6994 authored by Bjorn Svensson's avatar Bjorn Svensson Committed by GitHub
Browse files

Correcting the build target `coverage` for enabled SSL (#1009)

* Exclude includes from /usr in coverage reporting

* Correct build target `coverage` for enabled ssl

`USE_SSL=1 make coverage` will now build the test binary with the
forwarded define HIREDIS_TEST_SSL. This avoids inconsistency between
built test binary and the testrunner `test.sh`.
This enables test coverage measurements for SSL too.
parent 30ff8d85
...@@ -73,7 +73,7 @@ USE_SSL?=0 ...@@ -73,7 +73,7 @@ USE_SSL?=0
# This is required for test.c only # This is required for test.c only
ifeq ($(USE_SSL),1) ifeq ($(USE_SSL),1)
CFLAGS+=-DHIREDIS_TEST_SSL export CFLAGS+=-DHIREDIS_TEST_SSL
endif endif
ifeq ($(uname_S),Linux) ifeq ($(uname_S),Linux)
...@@ -299,12 +299,12 @@ gprof: ...@@ -299,12 +299,12 @@ gprof:
$(MAKE) CFLAGS="-pg" LDFLAGS="-pg" $(MAKE) CFLAGS="-pg" LDFLAGS="-pg"
gcov: gcov:
$(MAKE) CFLAGS="-fprofile-arcs -ftest-coverage" LDFLAGS="-fprofile-arcs" $(MAKE) CFLAGS+="-fprofile-arcs -ftest-coverage" LDFLAGS="-fprofile-arcs"
coverage: gcov coverage: gcov
make check make check
mkdir -p tmp/lcov mkdir -p tmp/lcov
lcov -d . -c -o tmp/lcov/hiredis.info lcov -d . -c --exclude '/usr*' -o tmp/lcov/hiredis.info
genhtml --legend -o tmp/lcov/report tmp/lcov/hiredis.info genhtml --legend -o tmp/lcov/report tmp/lcov/hiredis.info
noopt: noopt:
......
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