X-Git-Url: https://git.cworth.org/git?p=notmuch;a=blobdiff_plain;f=test%2Fnotmuch-test;fp=test%2Fnotmuch-test;h=5d27e4d1d143c74daa4b3921a151876e8d441ce0;hp=14747bdbfc44d040cc0118d3d84328a7c69e6e06;hb=ec26eeaeec87781dee7dbf720103a5bc9b6bba5d;hpb=73f3081160fb80345f3953cbdeba340975375325 diff --git a/test/notmuch-test b/test/notmuch-test index 14747bdb..5d27e4d1 100755 --- a/test/notmuch-test +++ b/test/notmuch-test @@ -20,6 +20,14 @@ fi set -eu +# Where to run the tests +# XXX FIXME this code is duplicated with test-lib.sh +if [[ -n "${NOTMUCH_BUILDDIR}" ]]; then + TEST_DIRECTORY=$NOTMUCH_BUILDDIR/test +else + TEST_DIRECTORY=$NOTMUCH_SRCDIR/test +fi + TESTS= for test in ${NOTMUCH_TESTS-}; do TESTS="$TESTS $NOTMUCH_SRCDIR/test/$test" @@ -80,7 +88,7 @@ for file in $TESTS do file=${file##*/} # drop leading path components file=${file%.sh} # drop trailing '.sh' - RESULT_FILES="$RESULT_FILES $NOTMUCH_BUILDDIR/test/test-results/$file" + RESULT_FILES="$RESULT_FILES $TEST_DIRECTORY/test-results/$file" done echo @@ -94,6 +102,6 @@ if [ -n "$META_FAILURE" ]; then fi # Clean up -rm -rf $NOTMUCH_BUILDDIR/test/test-results +rm -rf $TEST_DIRECTORY/test-results exit $ev