Test script - allow valgrind to be run w/o the leak check

This commit is contained in:
Max Brunsfeld 2016-01-29 17:03:35 -08:00
parent 95828f42a8
commit b1f4b046f5

View file

@ -24,13 +24,14 @@ EOF
}
profile=
leak_check=no
mode=normal
args=()
target=tests
export BUILDTYPE=Test
cmd="out/${BUILDTYPE}/${target}"
while getopts "df:s:ghpv" option; do
while getopts "df:s:gGhpv" option; do
case ${option} in
h)
usage
@ -42,6 +43,10 @@ while getopts "df:s:ghpv" option; do
g)
mode=valgrind
;;
G)
mode=valgrind
leak_check=full
;;
p)
profile=true
;;
@ -69,7 +74,7 @@ case ${mode} in
valgrind \
--suppressions=./script/util/valgrind.supp \
--dsymutil=yes \
--leak-check=full \
--leak-check=${leak_check} \
$cmd "${args[@]}" 2>&1 | \
grep --color -E '\w+_specs?.cc:\d+|$'
;;