Signed-off-by: Thomas Schwinge <thomas at schwinge.name> --- test/test-lib.sh | 5 +++-- 1 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/test/test-lib.sh b/test/test-lib.sh index f536172..3471ead 100755 --- a/test/test-lib.sh +++ b/test/test-lib.sh @@ -815,13 +815,14 @@ EOF } +# Locate the directory containing the `notmuch' executable we are to use. find_notmuch_path () { dir="$1" while [ -n "$dir" ]; do bin="$dir/notmuch" - if [ -x "$bin" ]; then + if [ -f "$bin" -a -x "$bin" ]; then echo "$dir" return fi @@ -858,7 +859,7 @@ then make_valgrind_symlink () { # handle only executables - test -x "$1" || return + test -f "$1" -a -x "$1" || return base=$(basename "$1") symlink_target=$TEST_DIRECTORY/../$base -- 1.7.1