Valgrind will enable memcheck, drd and sgcheck by default

Signed-off-by: Anders Roxell <[email protected]>
---
 configure.ac            | 5 +++++
 m4/ax_valgrind_check.m4 | 2 +-
 test/Makefile.inc       | 3 +++
 test/README             | 6 ++++++
 4 files changed, 15 insertions(+), 1 deletion(-)

diff --git a/configure.ac b/configure.ac
index 57054c5..c92f5fd 100644
--- a/configure.ac
+++ b/configure.ac
@@ -44,6 +44,11 @@ AC_TYPE_UINT32_T
 AC_TYPE_UINT64_T
 
 ##########################################################################
+# Allow valgrind suite to run against the defined tests
+##########################################################################
+AX_VALGRIND_CHECK
+
+##########################################################################
 # Set correct platform library version
 ##########################################################################
 AGE=0
diff --git a/m4/ax_valgrind_check.m4 b/m4/ax_valgrind_check.m4
index 25d5b09..ff05f56 100644
--- a/m4/ax_valgrind_check.m4
+++ b/m4/ax_valgrind_check.m4
@@ -114,7 +114,7 @@ VALGRIND_drd_FLAGS ?=
 VALGRIND_sgcheck_FLAGS ?=
 
 # Internal use
-valgrind_tools = memcheck helgrind drd sgcheck
+valgrind_tools ?= memcheck helgrind drd sgcheck
 valgrind_log_files = $(addprefix test-suite-,$(addsuffix 
.log,$(valgrind_tools)))
 
 valgrind_memcheck_flags = --tool=memcheck $(VALGRIND_memcheck_FLAGS)
diff --git a/test/Makefile.inc b/test/Makefile.inc
index 93ead25..e20a848 100644
--- a/test/Makefile.inc
+++ b/test/Makefile.inc
@@ -12,3 +12,6 @@ AM_CFLAGS += $(INCFLAGS)
 AM_CXXFLAGS = $(INCFLAGS)
 
 AM_LDFLAGS += -L$(LIB)
+
+@VALGRIND_CHECK_RULES@
+valgrind_tools = memcheck drd sgcheck
diff --git a/test/README b/test/README
index a86e01a..b3aa3ab 100644
--- a/test/README
+++ b/test/README
@@ -8,3 +8,9 @@ ensure that the ODP API Implementations all perform identically 
and to
 specification. Tests inside the validation directory shall be platform
 independent. However, they may need platform dependent environment
 configuration.
+
+To run valgrind on the executables do:
+$ ./bootstrap
+$ ./configure --enable-test-vald --enable-valgrind
+$ cd test/validation
+$ make check-valgrind
-- 
2.1.4

_______________________________________________
lng-odp mailing list
[email protected]
https://lists.linaro.org/mailman/listinfo/lng-odp

Reply via email to