• Home
  • Raw
  • Download

Lines Matching full:valgrind

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…
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
55 # Alternatively, a "check-valgrind-$TOOL" rule will be added, for $TOOL in
85 dnl Check for --enable-valgrind
86 AC_ARG_ENABLE([valgrind],
87 … [AS_HELP_STRING([--enable-valgrind], [Whether to enable Valgrind on the unit tests])],
91 # Check for Valgrind.
92 AC_CHECK_PROG([VALGRIND],[valgrind],[valgrind])
93 AS_IF([test "$VALGRIND" = ""],[
95 … AC_MSG_ERROR([Could not find valgrind; either install it or reconfigure with --disable-valgrind])
106 AM_EXTRA_RECURSIVE_TARGETS([check-valgrind])
108 # Check for Valgrind tools we care about.
111 AC_ARG_ENABLE([valgrind-]vgtool,
113 [AS_HELP_STRING([--enable-valgrind-]vgtool, [Whether to use ]vgtool[ during the Valgrind tests])],d…
114 [AS_HELP_STRING([--disable-valgrind-]vgtool, [Whether to skip ]vgtool[ during the Valgrind tests])]…
121 AC_CACHE_CHECK([for Valgrind tool ]vgtool,
127 AS_IF([`$VALGRIND --tool=]vgtoolx[ --help >/dev/null 2>&1`],[
133 AC_MSG_ERROR([Valgrind does not support ]vgtool[; reconfigure with --disable-valgrind-]vgtool)
145 AM_EXTRA_RECURSIVE_TARGETS([check-valgrind-]vgtool)
151 # Valgrind check
154 # - VALGRIND_SUPPRESSIONS_FILES: Space-separated list of Valgrind suppressions
156 # - VALGRIND_FLAGS: General flags to pass to all Valgrind tools.
158 # - VALGRIND_$toolname_FLAGS: Flags to pass to Valgrind $toolname (one of:
182 valgrind_v_use_0 = @echo " USE " $(patsubst check-valgrind-%,%,$''@):;
192 check-valgrind:
195 $(foreach tool, $(valgrind_enabled_tools), check-valgrind-$(tool))
197 @echo "Need to reconfigure with --enable-valgrind"
200 # Valgrind running
203 env VALGRIND=$(VALGRIND) \
209 $(VALGRIND) $(VALGRIND_SUPPRESSIONS) --error-exitcode=1 $(VALGRIND_FLAGS)
212 check-valgrind-$(1): $$(BUILT_SOURCES)
220 @echo "Need to reconfigure with --enable-valgrind-$(1)"
222 @echo "Need to reconfigure with --enable-valgrind"
229 A''M_DISTCHECK_CONFIGURE_FLAGS += --disable-valgrind
234 .PHONY: check-valgrind $(add-prefix check-valgrind-,$(valgrind_tools))