File: valgrind-wrapper.sh

package info (click to toggle)
jgmenu 4.5.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 2,464 kB
  • sloc: ansic: 13,215; perl: 4,953; sh: 3,009; python: 600; makefile: 294; xml: 98
file content (28 lines) | stat: -rwxr-xr-x 472 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
#!/bin/sh

menu_file=$(mktemp)

cat >${menu_file} <<EOF
xterm,xterm
firefox,firefox
EOF

if test $# -lt 1
then
	cmd="./jgmenu --die-when-loaded --vsimple --csv-file=${menu_file}"
else
	cmd="$@"
fi

valgrind --leak-check=full \
	 --leak-resolution=high \
	 --show-leak-kinds=all \
	 --num-callers=20 \
	 --log-file=valgrind.log \
	 --suppressions=scripts/valgrind.supp \
	 --gen-suppressions=all \
	 ${cmd}

printf "nr_lines="; cat valgrind.log | wc -l

rm -f ${menu_file}