Module: check_mk
Branch: master
Commit: 9c07a3d09c3b6ebaafc5e5e897aa85a2b49207b1
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=9c07a3d09c3b6e…
Author: Sven Panne <sp(a)mathias-kettner.de>
Date: Fri Apr 12 09:26:53 2019 +0200
Run C++ unit test under valgrind if possible.
Change-Id: I43bbbcac575c86023044852b2515326fce007a38
---
livestatus/src/test/Makefile.am | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/livestatus/src/test/Makefile.am b/livestatus/src/test/Makefile.am
index b08b3d9..72e0d0b 100644
--- a/livestatus/src/test/Makefile.am
+++ b/livestatus/src/test/Makefile.am
@@ -34,6 +34,7 @@ BEAR ?= bear
CPPCHECK ?= cppcheck
IWYU_TOOL ?= iwyu_tool
RUN_CLANG_TIDY ?= run-clang-tidy-$(CLANG_VERSION).py
+VALGRIND ?= $(shell valgrind --version > /dev/null 2>&1 && echo
"valgrind --quiet")
GOOGLETEST :=$(top_srcdir)/omd/packages/googletest
@@ -63,7 +64,7 @@ test_neb_LDADD = \
.PHONY: unit-test build_googletest
unit-test: test_neb$(EXEEXT)
- GTEST_OUTPUT=xml ./test_neb$(EXEEXT)
+ GTEST_OUTPUT=xml $(VALGRIND) ./test_neb$(EXEEXT)
# NOTE: This is a bit of a hack. What we really want is a clean chroot/VM/image
# where we just install our build dependencies.