Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
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...
commit a85c6aaca875d2fb01e5b7602b62defb2d2d20e0 1 parent 9f8bd39
@fabbione authored
View
8 build-aux/check.mk
@@ -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
View
4 kronosnetd/Makefile.am
@@ -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
6 libtap/Makefile.am
@@ -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
11 tests/Makefile.am
@@ -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
Please sign in to comment.
Something went wrong with that request. Please try again.