summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTim-Philipp Müller <tim@centricular.com>2014-09-25 17:35:34 +0100
committerTim-Philipp Müller <tim@centricular.com>2014-09-25 17:35:34 +0100
commit4d13a9cc2dae1d09083600459350fa9c402d3ec9 (patch)
tree372d1bc0e00901ff5a1ea75edcb30e8e4ce57f25
parent8aadeaaa8a948d7ce62008789ab03e9aa514c2b9 (diff)
check.mak: use different valgrind.log files per unit test
So we can run multiple valgrind tests in parallel.
-rw-r--r--check.mak13
1 files changed, 7 insertions, 6 deletions
diff --git a/check.mak b/check.mak
index 7774f3a..0869d09 100644
--- a/check.mak
+++ b/check.mak
@@ -46,7 +46,8 @@ LOOPS ?= 10
# valgrind any given test by running make test.valgrind
%.valgrind: %
- @$(TESTS_ENVIRONMENT) \
+ @valgrind_log=$(subst /,-,$*-valgrind.log); \
+ $(TESTS_ENVIRONMENT) \
CK_DEFAULT_TIMEOUT=360 \
G_SLICE=always-malloc \
$(LIBTOOL) --mode=execute \
@@ -55,12 +56,12 @@ LOOPS ?= 10
--tool=memcheck --leak-check=full --trace-children=yes \
--show-possibly-lost=no \
--leak-resolution=high --num-callers=20 \
- ./$* 2>&1 | tee valgrind.log
- @if grep "==" valgrind.log > /dev/null 2>&1; then \
- rm valgrind.log; \
+ ./$* 2>&1 | tee $$valgrind_log ; \
+ if grep "==" $$valgrind_log > /dev/null 2>&1; then \
+ rm $$valgrind_log; \
exit 1; \
- fi
- @rm valgrind.log
+ fi ; \
+ rm $$valgrind_log
# valgrind any given test and generate suppressions for it
%.valgrind.gen-suppressions: %