From: Simon Josefsson Date: Tue, 27 Jun 2006 13:16:00 +0000 (+0000) Subject: Add --enable-valgrind-tests that make it possible to enable/disable X-Git-Tag: gnutls_1_4_1~35 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=0b1caf67c5bdbcd01a04df220bfe40796b00ae5f;p=thirdparty%2Fgnutls.git Add --enable-valgrind-tests that make it possible to enable/disable use of valgrind on self tests specifically. Defaults to enabled if valgrind is installed and we aren't cross-compiling. --- diff --git a/configure.in b/configure.in index c447d998e9..0d47276e4b 100644 --- a/configure.in +++ b/configure.in @@ -81,6 +81,21 @@ AC_ARG_ENABLE(profile-mode, opt_profiler_mode=$enableval) AC_MSG_RESULT($opt_profiler_mode) +if test "$cross_compiling" != no; then + AC_CHECK_PROGS(VALGRIND, valgrind) +fi +if test -z "$VALGRIND"; then + opt_valgrind_tests=no +else + opt_valgrind_tests=yes +fi +AC_MSG_CHECKING([whether self tests are run under valgrind]) +AC_ARG_ENABLE(valgrind-tests, + AS_HELP_STRING([--enable-valgrind-tests], + [run self tests under valgrind]), + opt_valgrind_tests=$enableval) +AC_MSG_RESULT($opt_valgrind_tests) + AC_MSG_RESULT([*** *** Checking for compilation programs... ]) diff --git a/tests/Makefile.am b/tests/Makefile.am index 17a3a9573d..632a7c8eaa 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -45,9 +45,7 @@ dist_check_SCRIPTS = pkcs12_neon pkcs8 TESTS = pkcs12_neon pkcs8 $(ctests) -VALGRIND=valgrind --tool=memcheck --leak-check=full --leak-resolution=high \ - --show-reachable=yes --num-callers=50 TESTS_ENVIRONMENT = \ PKCS12FILE=$(srcdir)/client.p12 \ PKCS12PASSWORD=foobar \ - `if $(VALGRIND) /bin/true > /dev/null 2>&1; then echo $(VALGRIND); else echo $$SHELL -c; fi` + $(VALGRIND)