Diff options
Diffstat (limited to 'tests/valgrind')
| -rwxr-xr-x | tests/valgrind/bin/cgit | 21 |
1 file changed, 17 insertions, 4 deletions
diff --git a/tests/valgrind/bin/cgit b/tests/valgrind/bin/cgit index e35e220..e5666b5 100755 --- a/tests/valgrind/bin/cgit +++ b/tests/valgrind/bin/cgit @@ -4,12 +4,25 @@ # when setup.sh puts this directory ahead of the build on PATH. Git's own # suppression file is reused rather than kept in a copy here, so GIT_VALGRIND # points into the bundled Git tree while CGIT_VALGRIND points back at this -# wrapper's home. -exec valgrind -q --error-exitcode=126 \ +# wrapper's home. The tool comes from --valgrind=<tool> and its options follow +# Git's own wrapper, with any in GIT_VALGRIND_OPTIONS added after them. +case "$CGIT_TEST_VALGRIND" in +memcheck) + tool_options="--leak-check=no --track-origins=yes" + ;; +memcheck-fast) + tool_options="--leak-check=no" + ;; +*) + tool_options="--tool=$CGIT_TEST_VALGRIND" + ;; +esac + +exec "$CGIT_VALGRIND_PROGRAM" -q --error-exitcode=126 \ --suppressions="$GIT_VALGRIND/default.supp" \ --gen-suppressions=all \ - --leak-check=no \ - --track-origins=yes \ + $tool_options \ --log-fd=4 \ --input-fd=4 \ + $GIT_VALGRIND_OPTIONS \ "$CGIT_VALGRIND/../../build/cgit" "$@" |
