2
0

valgrind-error.sh 289 B

123456789101112131415161718192021222324
  1. #!/bin/sh
  2. #
  3. #
  4. # Our valgrind "error" wrapper.
  5. TMP="valgrind.tmp.$$"
  6. valgrind --suppressions=valgrind-bash.supp --leak-check=full -q "$@" 2> $TMP
  7. result="$?"
  8. # verify no errors
  9. output="`cat $TMP`"
  10. if [ "$output" != "" ]; then
  11. cat $TMP >&2
  12. result=1
  13. fi
  14. rm $TMP
  15. exit $result