Commit 3039e3cd authored by Mukund Sivaraman's avatar Mukund Sivaraman
Browse files

[2036] Introduce --enable-valgrind-suppressions configure switch

The rationale for this is:

* Developers configure with `--enable-valgrind` and run `make check` to
  see all the error reports (`make check` continues testing even if
  there are Valgrind issues). This encourages us to fix these issues,
  especially if we are modifying those parts of the code as part of
  another bug.

* Builders configure with `--enable-valgrind
  --enable-valgrind-suppressions` and run `make check` with
  suppressions. `make check` doesn't show existing suppressed issues and
  stops building if it finds a new Valgrind issue that is not
  suppressed.
parent 61814fef
......@@ -988,10 +988,19 @@ AM_CONDITIONAL(HAVE_VALGRIND, test "x$VALGRIND" != "xno")
AC_ARG_ENABLE(valgrind, [AC_HELP_STRING([--enable-valgrind],
[run tests under Valgrind [default=no]])], enable_valgrind=$enableval, enable_valgrind=no)
AM_CONDITIONAL(ENABLE_VALGRIND, test "x$enable_valgrind" != "xno")
AC_ARG_ENABLE(valgrind-suppressions, [AC_HELP_STRING([--enable-valgrind-suppressions],
[enable Valgrind suppressions [default=no]])], enable_valgrind_suppressions=$enableval, enable_valgrind_suppressions=no)
use_valgrind=no
use_valgrind_suppressions=no
if test "x$VALGRIND" != "xno" -a "x$enable_valgrind" != "xno"; then
VALGRIND_COMMAND="$VALGRIND -q --error-exitcode=1 --gen-suppressions=all --suppressions=\$(top_srcdir)/src/valgrind-suppressions --suppressions=\$(top_srcdir)/src/valgrind-suppressions.revisit --num-callers=48 --leak-check=full --fullpath-after="
if test "x$enable_valgrind_suppressions" != "xno"; then
VALGRIND_SUPPRESSIONS="--error-exitcode=1 --suppressions=\$(top_srcdir)/src/valgrind-suppressions --suppressions=\$(top_srcdir)/src/valgrind-suppressions.revisit"
use_valgrind_suppressions=yes
fi
VALGRIND_COMMAND="$VALGRIND -q --gen-suppressions=all $VALGRIND_SUPPRESSIONS --num-callers=48 --leak-check=full --fullpath-after="
use_valgrind=yes
fi
AC_SUBST(VALGRIND_COMMAND)
......@@ -1305,7 +1314,8 @@ Features:
Developer:
Google Tests: $gtest_path
Valgrind: $enable_valgrind
Valgrind: $use_valgrind
Valgrind Suppressions: $use_valgrind_suppressions
C++ Code Coverage: $USE_LCOV
Python Code Coverage: $USE_PYCOVERAGE
Generate Manuals: $enable_man
......
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