mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-07-28 16:03:15 +02:00
Have make cov
optionally include branch coverage statistics
Added an option to configure to allow for branch coverage statistics gathering. Disabled logprint macro when coverage testing is on so that unnecessary branches are not analyzed.
This commit is contained in:
12
configure.ac
12
configure.ac
@@ -158,6 +158,12 @@ AC_ARG_ENABLE([lcov],
|
||||
[enable lcov testing (default is no)])],
|
||||
[use_lcov=yes],
|
||||
[use_lcov=no])
|
||||
|
||||
AC_ARG_ENABLE([lcov-branch-coverage],
|
||||
[AS_HELP_STRING([--enable-lcov-branch-coverage],
|
||||
[enable lcov testing branch coverage (default is no)])],
|
||||
[use_lcov_branch=yes],
|
||||
[use_lcov_branch=no])
|
||||
|
||||
AC_ARG_ENABLE([glibc-back-compat],
|
||||
[AS_HELP_STRING([--enable-glibc-back-compat],
|
||||
@@ -436,6 +442,12 @@ if test x$use_lcov = xyes; then
|
||||
[AC_MSG_ERROR("lcov testing requested but --coverage linker flag does not work")])
|
||||
AX_CHECK_COMPILE_FLAG([--coverage],[CXXFLAGS="$CXXFLAGS --coverage"],
|
||||
[AC_MSG_ERROR("lcov testing requested but --coverage flag does not work")])
|
||||
AC_DEFINE(USE_COVERAGE, 1, [Define this symbol if coverage is enabled])
|
||||
CXXFLAGS="$CXXFLAGS -Og"
|
||||
fi
|
||||
|
||||
if test x$use_lcov_branch != xno; then
|
||||
AC_SUBST(LCOV_OPTS, "$LCOV_OPTS --rc lcov_branch_coverage=1")
|
||||
fi
|
||||
|
||||
dnl Check for endianness
|
||||
|
Reference in New Issue
Block a user