$(RM) $(DEPFILES) .clang_complete autosetup/jimsh0 config.h config.log \
conststrings.c contrib/Makefile doc/Makefile doc/neomutt.1 \
html Makefile po/Makefile test/Makefile
+ $(RM) *.gc?? */*.gc?? test/*/*.gc??
+ $(RM) lcov.info lcov
+
+# coverage testing
+coverage: all test
+ $(RM) lcov
+ $(RM) config/dump.gc??
+ lcov -t "result" -o lcov.info -c -d mutt -d config
+ genhtml -o lcov lcov.info
# Tests for the config code
config-test: libmutt.a libemail.a libconfig.a
with-tokyocabinet:path => "Location of TokyoCabinet"
# System
with-sysroot:path => "Target system root"
+# Coverage testing
+ lcov=0 => "Enable Coverage Testing"
# Enable all options
everything=0 => "Enable all options"
}
# Keep sorted, please.
foreach opt {
bdb doc everything fmemopen full-doc gdbm gnutls gpgme gss
- homespool idn idn2 inotify kyotocabinet lmdb locales-fix lua mixmaster nls
+ homespool idn idn2 inotify kyotocabinet lcov lmdb locales-fix lua mixmaster nls
notmuch pgp qdbm sasl smime ssl tokyocabinet
} {
define want-$opt [opt-bool $opt]
}
}
+###############################################################################
+# Coverage Testing
+if {[get-define want-lcov]} {
+ define-append CFLAGS -fprofile-arcs -ftest-coverage
+ define-append LDFLAGS -fprofile-arcs -ftest-coverage
+}
+
###############################################################################
# Lua
if {[get-define want-lua]} {