add --enable-coverage for lcov
This commit is contained in:
+21
@@ -32,6 +32,27 @@ EXTRA_DIST = windows.mk mac.mk tool/tests/basic.sh
|
||||
|
||||
EXTRA_DIST += doc/Certificate_Authority_with_NEO.adoc doc/OS_X_code_signing.adoc doc/SSH_with_PIV_and_PKCS11.adoc doc/Windows_certificate.adoc doc/YubiKey_NEO_PIV_introduction.adoc
|
||||
|
||||
if ENABLE_COV
|
||||
cov-reset:
|
||||
rm -fr coverage
|
||||
find . -name "*.gcda" -exec rm {} \;
|
||||
lcov --directory . --zerocounters
|
||||
|
||||
cov-report:
|
||||
mkdir -p coverage
|
||||
lcov --compat-libtool --directory . --capture --output-file coverage/app.info
|
||||
lcov --extract coverage/app.info '*.c' --output-file coverage/app2.info
|
||||
genhtml -o coverage/ coverage/app2.info
|
||||
|
||||
cov:
|
||||
make cov-report
|
||||
|
||||
clean-local:
|
||||
make cov-reset
|
||||
|
||||
check:
|
||||
make cov
|
||||
endif
|
||||
|
||||
# Maintainer rules.
|
||||
|
||||
|
||||
+6
-1
@@ -120,7 +120,12 @@ else
|
||||
AC_MSG_ERROR([cannot find PCSC/winscard library/headers])
|
||||
fi
|
||||
|
||||
|
||||
AC_ARG_ENABLE([gcov],
|
||||
[AS_HELP_STRING([--enable-gcov],
|
||||
[use Gcov to test the test suite])],
|
||||
[],
|
||||
[enable_gcov=no])
|
||||
AM_CONDITIONAL([ENABLE_COV],[test '!' "$enable_gcov" = no])
|
||||
|
||||
AC_ARG_ENABLE([gcc-warnings],
|
||||
[AS_HELP_STRING([--enable-gcc-warnings],
|
||||
|
||||
@@ -51,3 +51,8 @@ endif
|
||||
|
||||
pkgconfigdir = $(libdir)/pkgconfig
|
||||
pkgconfig_DATA = ykpiv.pc
|
||||
|
||||
if ENABLE_COV
|
||||
AM_CFLAGS += --coverage
|
||||
AM_LDFLAGS = --coverage
|
||||
endif
|
||||
|
||||
@@ -59,3 +59,8 @@ yubico-piv-tool.1: $(yubico_piv_tool_SOURCES) \
|
||||
--name="Yubico PIV tool" \
|
||||
--include=$(srcdir)/yubico-piv-tool.h2m \
|
||||
--output=$@ $(builddir)/yubico-piv-tool$(EXEEXT)
|
||||
|
||||
if ENABLE_COV
|
||||
AM_CFLAGS += --coverage
|
||||
AM_LDFLAGS = --coverage
|
||||
endif
|
||||
|
||||
@@ -38,3 +38,7 @@ parse_name_LDADD = ../libpiv_util.la $(OPENSSL_LIBS)
|
||||
|
||||
check_PROGRAMS = parse_name
|
||||
TESTS = basic.sh $(check_PROGRAMS)
|
||||
|
||||
if ENABLE_COV
|
||||
AM_LDFLAGS += --coverage
|
||||
endif
|
||||
|
||||
Reference in New Issue
Block a user