# Copyright 2007, 2009-2010, 2012-2014
# The Board of Trustees of the Leland Stanford Junior University
#
-# See LICENSE for licensing terms.
+# SPDX-License-Identifier: MIT
ACLOCAL_AMFLAGS = -I m4
EXTRA_DIST = .clang-format .github .gitignore README.md LICENSE bootstrap \
--suppressions-list=tests/data/cppcheck.supp \
--enable=warning,performance,portability,style
-# Used by maintainers to run the main test suite under valgrind. Suppress
-# the xmalloc and pod-spelling tests because the former won't work properly
-# under valgrind (due to increased memory usage) and the latter is pointless
-# to run under valgrind. Don't try to trace several of the tests that are
-# written in Perl or shell and test Perl programs.
-check-valgrind: $(check_PROGRAMS) tests/data/dictionary.pwd
- rm -rf $(abs_top_builddir)/tmp-valgrind
- mkdir $(abs_top_builddir)/tmp-valgrind
- env valgrind --leak-check=full \
- --show-reachable=yes --trace-children=yes \
- --log-file=$(abs_top_builddir)/tmp-valgrind/log.%p \
- --suppressions=$(abs_top_srcdir)/tests/data/valgrind.supp \
- --trace-children-skip="/bin/sh,*/cat,*/diff,*/expr,*/grep,*/mkdir,*/rm,*/rmdir,*/sed,*/sleep,*/true,*/wc,*/docs/*-t,*/perl/*-t,*/data/make-krb5-conf,*/tools/heimdal-history-t,*/tools/wordlist*-t" \
- tests/runtests -l '$(abs_top_srcdir)/tests/TESTS'
+# The full path to valgrind and its options, used when doing valgrind
+# testing.
+VALGRIND_COMMAND = $(PATH_VALGRIND) --leak-check=full \
+ --trace-children=yes --trace-children-skip=/bin/sh \
+ --suppressions=$(abs_top_srcdir)/tests/data/valgrind.supp \
+ --log-file=$(abs_top_builddir)/tests/tmp/valgrind/log.%p
+# Used by maintainers to run the main test suite under valgrind.
+check-valgrind: $(check_PROGRAMS) tests/data/dictionary.pwd
+ rm -rf $(abs_top_builddir)/tests/tmp
+ mkdir $(abs_top_builddir)/tests/tmp
+ mkdir $(abs_top_builddir)/tests/tmp/valgrind
+ C_TAP_VALGRIND="$(VALGRIND_COMMAND)" tests/runtests \
+ -l '$(abs_top_srcdir)/tests/TESTS'
# Used by maintainers to reformat all source code using clang-format and
# excluding some files.