mirror of
https://github.com/Yubico/yubico-pam.git
synced 2024-11-29 00:24:11 +01:00
add a --enable-coverage switch
This commit is contained in:
parent
e7fadcf073
commit
de0eed5be4
3
.gitignore
vendored
3
.gitignore
vendored
@ -53,3 +53,6 @@ tests/pam_test
|
||||
tests/pam_test.log
|
||||
tests/pam_test.o
|
||||
tests/pam_test.trs
|
||||
coverage/
|
||||
tests/pam_test.gcno
|
||||
ykpamcfg.gcno
|
||||
|
26
Makefile.am
26
Makefile.am
@ -79,6 +79,32 @@ SUFFIXES = .1.txt .1 .8.txt .8
|
||||
.8.txt.8:
|
||||
$(A2X) --format=manpage -a revdate="Version $(VERSION)" $<
|
||||
|
||||
|
||||
if ENABLE_COV
|
||||
AM_CFLAGS += --coverage
|
||||
AM_LDFLAGS = --coverage
|
||||
|
||||
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
|
||||
|
||||
# Release
|
||||
|
||||
ChangeLog:
|
||||
|
@ -105,6 +105,13 @@ AC_ARG_WITH(pam-dir,
|
||||
esac])
|
||||
AC_MSG_NOTICE([PAM installation path $PAMDIR])
|
||||
|
||||
AC_ARG_ENABLE([coverage],
|
||||
[AS_HELP_STRING([--enable-coverage],
|
||||
[use Gcov to test the test suite])],
|
||||
[],
|
||||
[enable_cov=no])
|
||||
AM_CONDITIONAL([ENABLE_COV],[test '!' "$enable_cov" = no])
|
||||
|
||||
AC_ARG_ENABLE([gcc-warnings],
|
||||
[AS_HELP_STRING([--enable-gcc-warnings],
|
||||
[turn on lots of GCC warnings (for developers)])],
|
||||
|
@ -36,3 +36,7 @@ pam_test_LDADD = ../libpam_real.la ../libpam_util.la @LTLIBYUBIKEY@ @LTLIBYKCLIE
|
||||
|
||||
check_PROGRAMS = test util_test pam_test
|
||||
TESTS = $(check_PROGRAMS)
|
||||
|
||||
if ENABLE_COV
|
||||
AM_LDFLAGS += --coverage
|
||||
endif
|
||||
|
Loading…
Reference in New Issue
Block a user