Interplane page as plain text, for reading tools and agents. English is the reference text: translate it with your own tool. Text in backticks and in ``` blocks (commands, fingerprints, file names) and link targets in <...> are exact: copy them, never translate them. Page: /drakestapleton/git/blob/master/t/valgrind/valgrind.sh # git [Ported from github.com/git/git] Sync with Git 2.56.1 Brought by drakestapleton Sign in to star 0 stars 0 watching About Files History Releases Proposed changes Issues For developers branch `master` Branches Tags History `git / t / valgrind / valgrind.sh` 40 lines ยท 894 bytes Raw Blame History 1 #!/bin/sh 2 3 base=$(basename "$0") 4 case "$base" in 5 test-*) 6 program="$GIT_VALGRIND/../../t/helper/$base" 7 ;; 8 *) 9 program="$GIT_VALGRIND/../../$base" 10 ;; 11 esac 12 13 TOOL_OPTIONS='--leak-check=no' 14 15 test -z "$GIT_VALGRIND_ENABLED" && 16 exec "$program" "$@" 17 18 case "$GIT_VALGRIND_MODE" in 19 memcheck-fast) 20 ;; 21 memcheck) 22 VALGRIND_VERSION=$(valgrind --version) 23 VALGRIND_MAJOR=$(expr "$VALGRIND_VERSION" : '[^0-9]*\([0-9]*\)') 24 VALGRIND_MINOR=$(expr "$VALGRIND_VERSION" : '[^0-9]*[0-9]*\.\([0-9]*\)') 25 test 3 -gt "$VALGRIND_MAJOR" || 26 { test 3 -eq "$VALGRIND_MAJOR" && test 4 -gt "$VALGRIND_MINOR"; } || 27 TOOL_OPTIONS="$TOOL_OPTIONS --track-origins=yes" 28 ;; 29 *) 30 TOOL_OPTIONS="--tool=$GIT_VALGRIND_MODE" 31 esac 32 33 exec valgrind -q --error-exitcode=126 \ 34 --gen-suppressions=all \ 35 --suppressions="$GIT_VALGRIND/default.supp" \ 36 $TOOL_OPTIONS \ 37 --log-fd=4 \ 38 --input-fd=4 \ 39 $GIT_VALGRIND_OPTIONS \ 40 "$program" "$@"