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
18 # if the test fails, run it again at at least debug level 2
20 @$(TESTS_ENVIRONMENT) \
21 CK_DEFAULT_TIMEOUT=20 \
23 $(TESTS_ENVIRONMENT) \
24 GST_DEBUG=$$GST_DEBUG,*:2 \
25 CK_DEFAULT_TIMEOUT=20 \
28 # run any given test in a loop
30 @for i in `seq 1 $(LOOPS)`; do \
31 $(TESTS_ENVIRONMENT) \
32 CK_DEFAULT_TIMEOUT=20 \
35 # run any given test in an infinite loop
38 $(TESTS_ENVIRONMENT) \
39 CK_DEFAULT_TIMEOUT=20 \
42 # valgrind any given test by running make test.valgrind
44 $(TESTS_ENVIRONMENT) \
45 CK_DEFAULT_TIMEOUT=60 \
46 libtool --mode=execute \
47 $(VALGRIND_PATH) -q --suppressions=$(SUPPRESSIONS) \
48 --tool=memcheck --leak-check=full --trace-children=yes \
49 --leak-resolution=high --num-callers=20 \
50 $* 2>&1 | tee valgrind.log
51 @if grep "==" valgrind.log > /dev/null 2>&1; then \
57 # gdb any given test by running make test.gdb
59 $(TESTS_ENVIRONMENT) \
61 libtool --mode=execute \
67 @echo "Torturing tests ..."
68 for i in `seq 1 $(LOOPS)`; do \
70 (echo "Failure after $$i runs"; exit 1) || \
73 @banner="All $(LOOPS) loops passed"; \
74 dashes=`echo "$$banner" | sed s/./=/g`; \
75 echo $$dashes; echo $$banner; echo $$dashes
79 @echo "Valgrinding tests ..."
81 for t in $(filter-out $(VALGRIND_TESTS_DISABLE),$(TESTS)); do \
83 if test "$$?" -ne 0; then \
84 echo "Valgrind error for test $$t"; \
85 failed=`expr $$failed + 1`; \
86 whicht="$$whicht $$t"; \
89 if test "$$failed" -ne 0; then \
90 echo "$$failed tests had leaks under valgrind:"; \
96 @echo "make check -- run all checks"
97 @echo "make torture -- run all checks $(LOOPS) times"
98 @echo "make (dir)/(test).check -- run the given check once"
99 @echo "make (dir)/(test).forever -- run the given check forever"
100 @echo "make (dir)/(test).torture -- run the given check $(LOOPS) times"
102 @echo "make (dir)/(test).gdb -- start up gdb for the given test"
104 @echo "make valgrind -- valgrind all tests"
105 @echo "make (dir)/(test).valgrind -- valgrind the given test"