diff options
author | Daiki Ueno <ueno@gnu.org> | 2021-11-24 18:44:13 +0100 |
---|---|---|
committer | Daiki Ueno <ueno@gnu.org> | 2021-11-27 14:46:44 +0100 |
commit | 1352385432a3a670f5211482f8de440d0c3bdb2f (patch) | |
tree | 0ed151998afba158ac141eea1611be878213b0a4 | |
parent | 8f17428b84f877bd04e03b6cccd0f4f23101ef3a (diff) | |
download | gnutls-1352385432a3a670f5211482f8de440d0c3bdb2f.tar.gz |
build: update to use the latest valgrind-tests module from Gnulib
This adjust the existing valgrind invocations in the test suite with:
https://www.gnu.org/software/gnulib/manual/html_node/Valgrind-options.html
- make --suppressions option to per directory, using AM_VALGRINDFLAGS
- use LOG_VALGRIND for LOG_COMPILER
- quote '$(LOG_VALGRIND)' in TESTS_ENVIRONMENT
- move gl_VALGRIND_TESTS_DEFAULT_NO call before gl_INIT
Signed-off-by: Daiki Ueno <ueno@gnu.org>
-rw-r--r-- | configure.ac | 6 | ||||
-rw-r--r-- | tests/Makefile.am | 4 | ||||
-rw-r--r-- | tests/cert-tests/Makefile.am | 5 | ||||
-rw-r--r-- | tests/suite/Makefile.am | 6 |
4 files changed, 14 insertions, 7 deletions
diff --git a/configure.ac b/configure.ac index b689a5f94a..a871199823 100644 --- a/configure.ac +++ b/configure.ac @@ -459,7 +459,9 @@ fi AM_CONDITIONAL(HAVE_LIBUNISTRING, test "$ac_have_unistring" = "yes") # specify our own suppressions file; this needs to be set before gl_INIT -DEFAULT_VALGRINDFLAGS='-q --error-exitcode=1 --leak-check=full --track-origins=yes --gen-suppressions=all --suppressions=\$(srcdir)/suppressions.valgrind' +DEFAULT_VALGRINDFLAGS='-q --error-exitcode=1 --leak-check=full --track-origins=yes --gen-suppressions=all' + +gl_VALGRIND_TESTS_DEFAULT_NO dnl Note that g*l_INIT are run after we check for library capabilities, dnl to prevent issues from caching lib dependencies. See discussion @@ -559,8 +561,6 @@ if test "$gl_gcc_warnings" = yes; then gl_WARN_ADD([-fdiagnostics-show-option]) fi -gl_VALGRIND_TESTS_DEFAULT_NO - if test "$gl_cv_opt_valgrind_tests" != no; then gl_WARN_ADD([-fno-builtin-strcmp]) fi diff --git a/tests/Makefile.am b/tests/Makefile.am index e9ee9e9de2..d15595a657 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -620,7 +620,9 @@ endif TEST_EXTENSIONS = .sh SH_LOG_COMPILER = $(SHELL) -LOG_COMPILER = $(VALGRIND) + +AM_VALGRINDFLAGS = --suppressions=$(srcdir)/suppressions.valgrind +LOG_COMPILER = $(LOG_VALGRIND) distclean-local: rm -rf softhsm-*.db softhsm-*.config *.tmp tmp-* x509-crt-list-import-url.config.db port.lock.d diff --git a/tests/cert-tests/Makefile.am b/tests/cert-tests/Makefile.am index fe196917bb..f1de1bef27 100644 --- a/tests/cert-tests/Makefile.am +++ b/tests/cert-tests/Makefile.am @@ -152,7 +152,7 @@ TESTS = $(dist_check_SCRIPTS) # which are not trivial, and makes no point to address. TESTS_ENVIRONMENT = EXEEXT=$(EXEEXT) \ LC_ALL="C" \ - VALGRIND="$(VALGRIND)" \ + VALGRIND='$(LOG_VALGRIND)' \ LIBTOOL="$(LIBTOOL)" \ top_builddir="$(top_builddir)" \ abs_top_builddir="$(abs_top_builddir)" \ @@ -180,5 +180,8 @@ if DISABLE_BASH_TESTS TESTS_ENVIRONMENT += DISABLE_BASH_TESTS=1 endif +AM_VALGRINDFLAGS = --suppressions=$(srcdir)/suppressions.valgrind +LOG_COMPILER = $(LOG_VALGRIND) + distclean-local: rm -rf tmp-* *.tmp diff --git a/tests/suite/Makefile.am b/tests/suite/Makefile.am index 2bfb3cd5fd..aaac8c08b2 100644 --- a/tests/suite/Makefile.am +++ b/tests/suite/Makefile.am @@ -61,7 +61,7 @@ scripts_to_test = chain.sh \ TESTS_ENVIRONMENT = EXEEXT=$(EXEEXT) \ LC_ALL="C" \ PYTHON="$(PYTHON)" \ - VALGRIND="$(VALGRIND)" \ + VALGRIND='$(LOG_VALGRIND)' \ top_builddir="$(top_builddir)" \ abs_top_builddir="$(abs_top_builddir)" \ srcdir="$(srcdir)" \ @@ -117,4 +117,6 @@ prime_check_CPPFLAGS = $(AM_CPPFLAGS) $(NETTLE_CFLAGS) TEST_EXTENSIONS = .sh SH_LOG_COMPILER = $(SHELL) -LOG_COMPILER = $(VALGRIND) + +AM_VALGRINDFLAGS = --suppressions=$(srcdir)/suppressions.valgrind +LOG_COMPILER = $(LOG_VALGRIND) |