X-Git-Url: https://git.notmuchmail.org/git?p=notmuch;a=blobdiff_plain;f=test%2Fexport-dirs.sh;h=9bc99a2cf3588fcb2dbc3ac32933b9e425ebd7f6;hp=0578b1e50194d308d42f782556c951630a702bf1;hb=HEAD;hpb=040c3236afcf95bead0324a48c2e0b9cd7934993 diff --git a/test/export-dirs.sh b/test/export-dirs.sh index 0578b1e5..9bc99a2c 100644 --- a/test/export-dirs.sh +++ b/test/export-dirs.sh @@ -9,8 +9,7 @@ if [[ -z "${NOTMUCH_SRCDIR}" ]]; then export NOTMUCH_SRCDIR="$(cd "$(dirname "$0")"/.. && pwd)" fi -find_builddir() -{ +find_builddir () { local dir="$1" while [[ -n "$dir" ]] && [[ "$dir" != "/" ]]; do @@ -25,7 +24,7 @@ find_builddir() if [[ -z "${NOTMUCH_BUILDDIR}" ]]; then export NOTMUCH_BUILDDIR="$(find_builddir "$(pwd)")" - if [[ -z "${NOTMUCH_BUILDDIR}" ]]; then + if [ -z "${NOTMUCH_BUILDDIR}" -a "${NOTMUCH_TEST_INSTALLED-0}" = "0" ]; then echo "Run tests in a subdir of built notmuch tree." >&2 exit 1 fi