Commit 2eada6f4e62ac106ac147c31a5664504df8e27c3
1 parent
800c31bf
Add valgrind rule
Showing
1 changed file
with
13 additions
and
0 deletions
test/Makefile.am
| ... | ... | @@ -19,3 +19,16 @@ TESTS_ENVIRONMENT = @RUNSHARED@=$(top_builddir)/src/.libs$(TEST_ENV_DIR):$(LIBDI |
| 19 | 19 | TESTS = test_ctools.sh \ |
| 20 | 20 | $(TEST_CSCRIPTS) \ |
| 21 | 21 | $(TEST_PYTHON_SCRIPT) |
| 22 | + | |
| 23 | +# Add Valgrind rule | |
| 24 | +valgrind: | |
| 25 | + @if type valgrind >/dev/null 2>&1; then \ | |
| 26 | + for prog in $(check_PROGRAMS) ; do \ | |
| 27 | + valgrind --leak-check=full \ | |
| 28 | + --xml=yes --xml-file=tmp.xml ./$$prog; \ | |
| 29 | + sed '/<\/valgrindoutput>/d' tmp.xml > valgrind_$$prog.xml; \ | |
| 30 | + echo '</valgrindoutput>' >> valgrind_$$prog.xml; \ | |
| 31 | + done ; \ | |
| 32 | + else \ | |
| 33 | + echo "valgrind not found in PATH."; \ | |
| 34 | + fi | ... | ... |