2 for i in `find . -name ".libs" -type d`; do \
7 # hangs spectacularly on some machines, so let's not do this by default yet
17 # run any given test by running make test.check
19 @$(TESTS_ENVIRONMENT) \
20 CK_DEFAULT_TIMEOUT=20 \
23 # run any given test in a loop
25 @for i in `seq 1 $(LOOPS)`; do \
26 $(TESTS_ENVIRONMENT) \
27 CK_DEFAULT_TIMEOUT=20 \
30 # run any given test in an infinite loop
33 $(TESTS_ENVIRONMENT) \
34 CK_DEFAULT_TIMEOUT=20 \
37 # valgrind any given test by running make test.valgrind
39 $(TESTS_ENVIRONMENT) \
40 CK_DEFAULT_TIMEOUT=20 \
41 libtool --mode=execute \
42 $(VALGRIND_PATH) -q --suppressions=$(SUPPRESSIONS) \
43 --tool=memcheck --leak-check=full --trace-children=yes \
44 --leak-resolution=high \
45 $* 2>&1 | tee valgrind.log
46 @if grep "==" valgrind.log > /dev/null 2>&1; then \
52 # gdb any given test by running make test.gdb
54 $(TESTS_ENVIRONMENT) \
56 libtool --mode=execute \
61 @echo "Torturing tests ..."
62 for i in `seq 1 $(LOOPS)`; do \
64 (echo "Failure after $$i runs"; exit 1) || \
67 @banner="All $(LOOPS) loops passed"; \
68 dashes=`echo "$$banner" | sed s/./=/g`; \
69 echo $$dashes; echo $$banner; echo $$dashes
73 @echo "Valgrinding tests ..."
75 for t in $(filter-out $(VALGRIND_TESTS_DISABLE),$(TESTS)); do \
77 if test "$$?" -ne 0; then \
78 echo "Valgrind error for test $$t"; \
79 failed=`expr $$failed + 1`; \
80 whicht="$$whicht $$t"; \
83 if test "$$failed" -ne 0; then \
84 echo "$$failed tests had leaks under valgrind:"; \
90 @echo "make check -- run all checks"
91 @echo "make torture -- run all checks $(LOOPS) times"
92 @echo "make (dir)/(test).check -- run the given check once"
93 @echo "make (dir)/(test).forever -- run the given check forever"
94 @echo "make (dir)/(test).torture -- run the given check $(LOOPS) times"
96 @echo "make (dir)/(test).gdb -- start up gdb for the given test"
98 @echo "make valgrind -- valgrind all tests"
99 @echo "make (dir)/(test).valgrind -- valgrind the given test"