Lines Matching +full:valgrind +full:- +full:out

2 #    https://www.gnu.org/software/autoconf-archive/ax_valgrind_check.html
12 # AX_VALGRIND_CHECK checks whether Valgrind is present and, if so, allows
13 # running `make check` under a variety of Valgrind tools to check for
19 # the value of the --enable-valgrind option, which defaults to being
20 # enabled if Valgrind is installed and disabled otherwise. Individual
21 # Valgrind tools can be disabled via --disable-valgrind-<tool>, the
27 # LOG_COMPILER system, the $(VALGRIND) variable can be used within the
28 # shell scripts to enable Valgrind, as described here:
30 # https://www.gnu.org/software/gnulib/manual/html_node/Running-self_002dtests-under-valgrind.ht…
42 # VALGRIND_SUPPRESSIONS_FILES = my-project.supp
43 # EXTRA_DIST = my-project.supp
45 # This results in a "check-valgrind" rule being added to any Makefile.am
47 # configured with --enable-valgrind). Running `make check-valgrind` in
49 # each of the available Valgrind tools (out of memcheck, helgrind and drd)
51 # commandline with --enable-valgrind-sgcheck. The results for each check
52 # will be output to test-suite-$toolname.log. The target will succeed if
55 # Alternatively, a "check-valgrind-$TOOL" rule will be added, for $TOOL in
67 # and this notice are preserved. This file is offered as-is, without any
83 dnl Check for --enable-valgrind
84 AC_ARG_ENABLE([valgrind],
85 …[AS_HELP_STRING([--enable-valgrind], [Whether to enable Valgrind on the unit tests (requires GNU m…
89 # Check for Valgrind.
90 AC_CHECK_PROG([VALGRIND],[valgrind],[valgrind])
91 AS_IF([test "$VALGRIND" = ""],[
93 … AC_MSG_ERROR([Could not find valgrind; either install it or reconfigure with --disable-valgrind])
105 # Check for Valgrind tools we care about.
108 AC_ARG_ENABLE([valgrind-]vgtool,
110 [AS_HELP_STRING([--enable-valgrind-]vgtool, [Whether to use ]vgtool[ during the Valgrind tests])],d…
111 [AS_HELP_STRING([--disable-valgrind-]vgtool, [Whether to skip ]vgtool[ during the Valgrind tests])]…
118 AC_CACHE_CHECK([for Valgrind tool ]vgtool,
122 [m4_define([vgtoolx],[exp-]vgtool)],
124 AS_IF([`$VALGRIND --tool=]vgtoolx[ --help >/dev/null 2>&1`],[
130 AC_MSG_ERROR([Valgrind does not support ]vgtool[; reconfigure with --disable-valgrind-]vgtool)
139 valgrind_enabled_tools="$valgrind_enabled_tools ]m4_bpatsubst(vgtool,[^exp-])["
147 # Valgrind check
150 # - VALGRIND_SUPPRESSIONS_FILES: Space-separated list of Valgrind suppressions
152 # - VALGRIND_FLAGS: General flags to pass to all Valgrind tools.
153 # (Default: --num-callers=30)
154 # - VALGRIND_$toolname_FLAGS: Flags to pass to Valgrind $toolname (one of:
158 VALGRIND_SUPPRESSIONS ?= $(addprefix --suppressions=,$(VALGRIND_SUPPRESSIONS_FILES))
159 VALGRIND_FLAGS ?= --num-callers=30
160 VALGRIND_memcheck_FLAGS ?= --leak-check=full --show-reachable=no
161 VALGRIND_helgrind_FLAGS ?= --history-level=approx
166 valgrind_log_files = $(addprefix test-suite-,$(addsuffix .log,$(valgrind_tools)))
168 valgrind_memcheck_flags = --tool=memcheck $(VALGRIND_memcheck_FLAGS)
169 valgrind_helgrind_flags = --tool=helgrind $(VALGRIND_helgrind_FLAGS)
170 valgrind_drd_flags = --tool=drd $(VALGRIND_drd_FLAGS)
171 valgrind_sgcheck_flags = --tool=exp-sgcheck $(VALGRIND_sgcheck_FLAGS)
175 valgrind_quiet_0 = --quiet
178 valgrind_v_use_0 = @echo " USE " $(patsubst check-valgrind-%,%,$''@):;
182 valgrind_lt = $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=execute
188 check-valgrind:
190 $(A''M_V_at)$(MAKE) $(AM_MAKEFLAGS) -k \
191 $(foreach tool, $(valgrind_enabled_tools), check-valgrind-$(tool))
193 @echo "Need to use GNU make and reconfigure with --enable-valgrind"
196 # Valgrind running
199 env VALGRIND=$(VALGRIND) \
200 G_SLICE=always-malloc,debug-blocks \
201 G_DEBUG=fatal-warnings,fatal-criticals,gc-friendly
205 $(VALGRIND) $(VALGRIND_SUPPRESSIONS) --error-exitcode=1 $(VALGRIND_FLAGS)
208 check-valgrind-$(1):
209 ifeq ($$(VALGRIND_ENABLED)-$$(ENABLE_VALGRIND_$(1)),yes-yes)
210 $$(valgrind_v_use)$$(MAKE) check-TESTS \
214 TEST_SUITE_LOG=test-suite-$(1).log
216 @echo "Need to reconfigure with --enable-valgrind-$(1)"
218 @echo "Need to reconfigure with --enable-valgrind"
225 A''M_DISTCHECK_CONFIGURE_FLAGS += --disable-valgrind
230 .PHONY: check-valgrind $(add-prefix check-valgrind-,$(valgrind_tools))
235 check-valgrind:
236 @echo "Need to use GNU make and reconfigure with --enable-valgrind"'