diff --git a/script/test b/script/test index 675281bd..d7897567 100755 --- a/script/test +++ b/script/test @@ -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+|$' ;;