Skip to content

Commit

Permalink
Add valgrind target
Browse files Browse the repository at this point in the history
Change-Id: I54f5814dd5678debcfb514d0cd068b4097078a36
  • Loading branch information
trondn committed Apr 23, 2012
1 parent 54ca350 commit d8e162b
Showing 1 changed file with 26 additions and 0 deletions.
26 changes: 26 additions & 0 deletions Makefile.am
Expand Up @@ -90,6 +90,32 @@ 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_open_empty_filename \
tests/.libs/test_create_database \
tests/.libs/test_get_miss \
tests/.libs/test_store_single_document \
tests/.libs/test_get_hit \
tests/.libs/test_delete_document \
tests/.libs/test_delete_nonexistent_document \
tests/.libs/test_get_deleted_document \
tests/.libs/test_bulk_store_documents \
tests/.libs/test_changes_since \
tests/.libs/test_local_documents

valgrind: ${check_PROGRAMS}
@for f in $(VALGRIND_TEST); \
do \
LD_LIBRARY_PATH=`pwd`/.libs \
DYLD_LIBRARY_PATH=`pwd`/.libs \
echo Running Valgrind on $$f; \
$(VALGRIND) $(VALGRIND_OPTIONS) --log-file=`basename $$f`.log $$f; \
done

reformat:
astyle --mode=c \
--quiet \
Expand Down

0 comments on commit d8e162b

Please sign in to comment.