2011-09-25 06:22:36 +00:00
|
|
|
NULL =
|
2011-11-06 12:41:21 +00:00
|
|
|
|
2011-11-12 07:08:12 +00:00
|
|
|
TEST_SUPPRESSIONS = $(top_builddir)/build/valgrind-suppressions
|
|
|
|
|
|
|
|
perform-memcheck: $(TEST_PROGS) $(TEST_SUPPRESSIONS)
|
2011-11-19 07:08:12 +00:00
|
|
|
@make -C $(top_builddir)/build all
|
2011-11-06 12:41:21 +00:00
|
|
|
@for test in $(TEST_PROGS); do \
|
|
|
|
G_SLICE=always-malloc libtool --mode=execute \
|
|
|
|
valgrind --trace-children=no --gen-suppressions=all \
|
2011-11-12 07:08:12 +00:00
|
|
|
--suppressions=$(TEST_SUPPRESSIONS) \
|
2011-11-06 12:41:21 +00:00
|
|
|
--leak-check=full --show-reachable=yes --num-callers=16 \
|
|
|
|
--quiet --error-exitcode=33 \
|
|
|
|
$(builddir)/$$test; \
|
|
|
|
done
|
2011-11-12 07:08:12 +00:00
|
|
|
|
|
|
|
if WITH_COVERAGE
|
|
|
|
coverage:
|
|
|
|
mkdir -p $(top_builddir)/build/coverage
|
|
|
|
$(LCOV) --directory . --capture --output-file $(top_builddir)/build/coverage.info
|
|
|
|
$(GENHTML) --output-directory $(top_builddir)/build/coverage $(top_builddir)/build/coverage.info
|
|
|
|
$(LCOV) --directory . --zerocounters
|
|
|
|
@echo "file://$(abs_top_builddir)/build/coverage/index.html"
|
|
|
|
|
|
|
|
clear-coverage:
|
|
|
|
$(LCOV) --directory . --zerocounters
|
|
|
|
|
|
|
|
endif
|
|
|
|
|