1 VALGRIND_CMDLINE="valgrind --leak-check=full --show-reachable=yes --track-origins=yes -q"
6 if [ -n "$VALGRIND" ]; then
7 local runner="$VALGRIND_CMDLINE "
14 $prefix.$prog.stdout \
15 2>$prefix.$prog.stderr
20 >$prefix.$prog.stdout \
21 2>$prefix.$prog.stderr
25 if [ -n "$VALGRIND" ]; then
26 # Check for Valgrind error output. The valgrind option
27 # --error-exitcode is not enough because Valgrind doesn't
28 # think unfreed allocs are errors.
29 if grep -E -q '^==[0-9]+== ' $prefix.$prog.stderr; then
30 echo "### $prefix ($prog) failed:" >&2
31 echo "valgrind detected an error" >&2
32 echo "for details, see test/$prefix.$prog.stderr" >&2
40 for testfile in $TESTFILES; do
41 tmpdir="testlogs/`basename $testfile`"
43 ${srcdir}/split-testfile.py $testfile $tmpdir | while read name; do
44 run_test load_dump $tmpdir/$name
45 run_test loadf_dumpf $tmpdir/$name
46 run_test loads_dumps $tmpdir/$name