Permalink
Browse files

Move hellgrind and valgrind checks to a common make snippet

Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
  • Loading branch information...
1 parent 9f8bd39 commit a85c6aaca875d2fb01e5b7602b62defb2d2d20e0 @fabbione committed Dec 14, 2012
Showing with 19 additions and 10 deletions.
  1. +8 −0 build-aux/check.mk
  2. +4 −0 kronosnetd/Makefile.am
  3. +4 −2 libtap/Makefile.am
  4. +3 −8 tests/Makefile.am
View
@@ -0,0 +1,8 @@
+VALGRIND = valgrind -q --error-exitcode=127 --track-fds=yes --leak-check=full
+HELGRIND = valgrind -v --tool=helgrind
+
+check-valgrind: $(check_PROGRAMS)
+ $(MAKE) TESTS_ENVIRONMENT="$(VALGRIND)" check
+
+check-helgrind: $(check_PROGRAMS)
+ $(MAKE) TESTS_ENVIRONMENT="$(HELGRIND)" check
@@ -10,6 +10,8 @@ MAINTAINERCLEANFILES = Makefile.in kronostnetd.logrotate
EXTRA_DIST = kronosnetd.logrotate.in
+include $(top_srcdir)/build-aux/check.mk
+
noinst_HEADERS = \
cfg.h \
etherfilter.h \
@@ -28,6 +30,8 @@ check_PROGRAMS = netutils_test
noinst_PROGRAMS = $(check_PROGRAMS)
+TESTS = $(check_PROGRAMS)
+
kronosnetd_SOURCES = \
cfg.c \
etherfilter.c \
View
@@ -8,10 +8,12 @@
MAINTAINERCLEANFILES = Makefile.in
-sources = libtap.c
-
EXTRA_DIST = libtap_exported_sym tap_updown_bad tap_updown_good
+include $(top_srcdir)/build-aux/check.mk
+
+sources = libtap.c
+
libversion = 0:0:0
# override global LIBS that pulls in lots of craft we don't need here
View
@@ -9,14 +9,7 @@
MAINTAINERCLEANFILES = Makefile.in
-VALGRIND = valgrind -q --error-exitcode=127 --track-fds=yes --leak-check=full
-HELGRIND = valgrind -v --tool=helgrind
-
-check-valgrind: $(check_PROGRAMS)
- $(MAKE) TESTS_ENVIRONMENT="$(VALGRIND)" check
-
-check-helgrind: $(check_PROGRAMS)
- $(MAKE) TESTS_ENVIRONMENT="$(HELGRIND)" check
+include $(top_srcdir)/build-aux/check.mk
noinst_PROGRAMS = \
ping_test \
@@ -26,6 +19,8 @@ noinst_PROGRAMS = \
check_PROGRAMS = \
timediff_test
+TESTS = $(check_PROGRAMS)
+
AM_CPPFLAGS = -I$(srcdir)/../libknet/
AM_LDFLAGS = $(top_builddir)/libknet/libknet.la

0 comments on commit a85c6aa

Please sign in to comment.