*** empty log message ***
[coreutils.git] / README-valgrind
blob4f630c04f6161069cc142d3c8913d566faa966a6
1 #! /bin/bash
3 # Convert Makefile.am files:
4 # find tests -name Makefile.am | xargs grep -wl PATH|xargs perl -pi -e \
5 # 's,src(\$\(PATH_SEPARATOR\)\$\$PATH),src/vg$1,'
7 # Create this symlink for suppressions:
8 # ln -s $PWD/.vg-suppressions /tmp/cu-vg
10 # Create src/vg:
12 coreutils=$(echo 'spy:;@echo $(all_programs)' | (cd src; make -f Makefile -f - spy | tr -s '\n ' ' '))
13 mkdir -p src/vg
14 pwd=`pwd`
15 srcdir=$pwd/src
16 path='export PATH='$srcdir':${PATH#*:}'
17 pre='#!/bin/sh\n'"$path"'\n'
18 n=9
19 vg='exec /usr/bin/valgrind --suppressions=/tmp/cu-vg --gen-suppressions=yes --leak-check=yes --quiet --num-callers='$n
20 cat <<EOF > src/vg/gen
21 for i in $coreutils; do
22 printf "$pre$vg \$i"' "\$@"\n' > \$i
23 chmod a+x \$i
24 done
25 EOF
26 cd src/vg
27 . ./gen