From: Bruno Haible Date: Sun, 3 Jan 2021 01:03:33 +0000 (+0100) Subject: valgrind-tests: Really enable the valgrind options test. X-Git-Tag: v1.0~3229 X-Git-Url: https://gitweb.git.savannah.gnu.org/gitweb/?a=commitdiff_plain;h=2564d154d7c879f42939a40dce8eb10b6712df29;p=gnulib.git valgrind-tests: Really enable the valgrind options test. * m4/valgrind-tests.m4 (gl_VALGRIND_TESTS): Don't assume that the valgrind options --error-exitcode=1 --leak-check=full always work. --- diff --git a/ChangeLog b/ChangeLog index 183e877033..9d9c280324 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2021-01-02 Bruno Haible + + valgrind-tests: Really enable the valgrind options test. + * m4/valgrind-tests.m4 (gl_VALGRIND_TESTS): Don't assume that the + valgrind options --error-exitcode=1 --leak-check=full always work. + 2021-01-02 Bruno Haible utimensat: Fix test failures on macOS 10.13. diff --git a/m4/valgrind-tests.m4 b/m4/valgrind-tests.m4 index c642f4e72e..499759dd55 100644 --- a/m4/valgrind-tests.m4 +++ b/m4/valgrind-tests.m4 @@ -1,4 +1,4 @@ -# valgrind-tests.m4 serial 4 +# valgrind-tests.m4 serial 5 dnl Copyright (C) 2008-2021 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, @@ -23,10 +23,13 @@ AC_DEFUN([gl_VALGRIND_TESTS], if test "$VALGRIND"; then AC_CACHE_CHECK([for valgrind options for tests], [gl_cv_opt_valgrind_tests], - [gl_cv_opt_valgrind_tests="-q --error-exitcode=1 --leak-check=full" - $VALGRIND $gl_valgrind_opts ls > /dev/null 2>&1 || - gl_cv_opt_valgrind_tests=no]) - + [gl_valgrind_opts='-q --error-exitcode=1 --leak-check=full' + if $VALGRIND $gl_valgrind_opts ls > /dev/null 2>&1; then + gl_cv_opt_valgrind_tests="$gl_valgrind_opts" + else + gl_cv_opt_valgrind_tests=no + fi + ]) if test "$gl_cv_opt_valgrind_tests" != no; then VALGRIND="$VALGRIND $gl_cv_opt_valgrind_tests" else