summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Haller <thaller@redhat.com>2015-04-09 12:17:07 +0200
committerThomas Haller <thaller@redhat.com>2015-04-09 17:02:49 +0200
commit4c9a8367742373d594894c6ed7009a505957874d (patch)
treead1037e89c9abd0c1368609eea6f4a35240c1406
parent373d09b0425c6dfb699ee4b6615ded0177d0e344 (diff)
downloadNetworkManager-4c9a8367742373d594894c6ed7009a505957874d.tar.gz
test: make valgrind suppressions file configurable
Add a configure option --with-valgrind-suppressions=path to allow specifying a different suppressions file.
-rw-r--r--configure.ac12
1 files changed, 10 insertions, 2 deletions
diff --git a/configure.ac b/configure.ac
index 0cb4b5a836..ee58d44cf2 100644
--- a/configure.ac
+++ b/configure.ac
@@ -881,8 +881,16 @@ AS_IF([test "$with_valgrind" == "yes"],
# Add conditionals and substitutions
AM_CONDITIONAL(ENABLE_TESTS, test "$enable_tests" != "no")
AM_CONDITIONAL(REQUIRE_ROOT_TESTS, test "$enable_tests" == "root")
+AC_ARG_WITH(valgrind-suppressions, AS_HELP_STRING([--with-valgrind-suppressions=path], [Use specific valgrind suppression file]))
+if test "$with_valgrind" == no; then
+ with_valgrind_suppressions=
+else
+ if test "$with_valgrind_suppressions" == ""; then
+ with_valgrind_suppressions='$(top_srcdir)/valgrind.suppressions'
+ fi
+fi
AS_IF([test "$with_valgrind" != "no"],
- AC_SUBST(VALGRIND_RULES, 'TESTS_ENVIRONMENT = "$(top_srcdir)/tools/run-test-valgrind.sh" "$(LIBTOOL)" "$(with_valgrind)" "$(top_srcdir)/valgrind.suppressions"'),
+ AC_SUBST(VALGRIND_RULES, 'TESTS_ENVIRONMENT = "$(top_srcdir)/tools/run-test-valgrind.sh" "$(LIBTOOL)" "$(with_valgrind)" '"$with_valgrind_suppressions"),
AC_SUBST(VALGRIND_RULES, []))
AM_CONDITIONAL(WITH_VALGRIND, test "${with_valgrind}" != "no")
@@ -1109,7 +1117,7 @@ echo
echo "Miscellaneous:"
echo " documentation: $enable_gtk_doc"
echo " tests: $enable_tests"
-echo " valgrind: $with_valgrind"
+echo " valgrind: $with_valgrind $with_valgrind_suppressions"
echo " code coverage: $enable_code_coverage"
echo " LTO: $enable_lto"
echo