valgrind-error.sh 263 B

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