File: valgrindme.sh

package info (click to toggle)
module-init-tools 3.4-1
  • links: PTS
  • area: main
  • in suites: lenny
  • size: 2,208 kB
  • ctags: 900
  • sloc: sh: 7,980; ansic: 5,036; makefile: 204
file content (14 lines) | stat: -rwxr-xr-x 355 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
#! /bin/sh

# Make sure it finds real one this time.
PATH=`pwd`:$PATH
valgrind -q --num-callers=8 --suppressions=tests/vg-suppressions --log-fd=3 `basename $0` "$@" 3>/tmp/valgrind
ret=$?

if [ -s /tmp/valgrind ]; then
    echo VALGRIND FAILED for $0 "$@" > /proc/$PPID/fd/1
    cat /tmp/valgrind > /proc/$PPID/fd/1
    kill $PPID
    exit 1
fi
exit $ret