- base=$(basename "$1")
- symlink_target=$TEST_DIRECTORY/../$base
- # do not override scripts
- if test -x "$symlink_target" &&
- test ! -d "$symlink_target" &&
- test "#!" != "$(head -c 2 < "$symlink_target")"
- then
- symlink_target=$TEST_DIRECTORY/valgrind.sh
- fi
- case "$base" in
- *.sh|*.perl)
- symlink_target=$TEST_DIRECTORY/unprocessed-script
- esac
- # create the link, or replace it if it is out of date
- make_symlink "$symlink_target" "$GIT_VALGRIND/bin/$base" || exit
- }
-
- # override notmuch executable in TEST_DIRECTORY/..
- GIT_VALGRIND=$TEST_DIRECTORY/valgrind
- mkdir -p "$GIT_VALGRIND"/bin
- make_valgrind_symlink $TEST_DIRECTORY/../notmuch
- OLDIFS=$IFS
- IFS=:
- for path in $PATH
- do
- ls "$path"/notmuch 2> /dev/null |
- while read file
- do
- make_valgrind_symlink "$file"
- done
- done
- IFS=$OLDIFS
- PATH=$GIT_VALGRIND/bin:$PATH
- GIT_EXEC_PATH=$GIT_VALGRIND/bin
- export GIT_VALGRIND
- test -n "$notmuch_path" && MANPATH="$notmuch_path/man:$MANPATH"
-else # normal case
- if test -n "$notmuch_path"
- then
- PATH="$notmuch_path:$PATH"
- MANPATH="$notmuch_path/man:$MANPATH"
- fi
+# we need the setting of GNUPGHOME in test-lib-common.sh
+if [ ${NOTMUCH_HAVE_GPGCONF_SOCKETDIR} = 1 ]; then
+ gpgconf --create-socketdir