Permalink
Browse files

Add valgrind target

Change-Id: I54f5814dd5678debcfb514d0cd068b4097078a36
  • Loading branch information...
1 parent f3c573e commit 4dadf1e68d8a05f42debe50941e700caf8c04199 @trondn trondn committed Apr 23, 2012
Showing with 21 additions and 0 deletions.
  1. +21 −0 Makefile.am
View
@@ -86,6 +86,27 @@ LINTFLAGS=-Iinclude -b -c -errchk=%all \
lint:
$(LINT.c) $(libcbio_la_SOURCES)
+VALGRIND=valgrind
+VALGRIND_OPTIONS=--tool=Memcheck --num-callers=50 \
+ --error-limit=yes --track-origins=yes --malloc-fill=55 \
+ --free-fill=aa --dsymutil=yes -q
+
+VALGRIND_TEST=tests/.libs/test_bulk_store_documents \
+ tests/.libs/test_changes_since tests/.libs/test_create_database \
+ tests/.libs/test_delete_document \
+ tests/.libs/test_delete_nonexistent_document \
+ tests/.libs/test_get_deleted_document tests/.libs/test_get_hit \
+ tests/.libs/test_get_miss tests/.libs/test_open_empty_filename \
+ tests/.libs/test_store_single_document
+
+valgrind: ${check_PROGRAMS}
+ for f in $(VALGRIND_TEST); \
+ do \
+ LD_LIBRARY_PATH=`pwd`/.libs \
+ DYLD_LIBRARY_PATH=`pwd`/.libs \
+ $(VALGRIND) $(VALGRIND_OPTIONS) --log-file=`basename $$f`.log $$f; \
+ done
+
reformat:
astyle --mode=c \
--quiet \

0 comments on commit 4dadf1e

Please sign in to comment.