r840:7c0ad6bd6a63
350 B
application/x-shellscript
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22
#!/bin/sh # Run in valgrind, with leak checking enabled valgrind -q --leak-check=full "$@" 2> .valgrind-log # Save the test result result="$?" # Valgrind should generate no error messages log_contents="`cat .valgrind-log`" if [ "$log_contents" != "" ]; then cat .valgrind-log >&2 result=1 fi rm -f .valgrind-log exit $result