aboutsummaryrefslogtreecommitdiff
path: root/test/notmuch-test
diff options
context:
space:
mode:
authorDavid Bremner <david@tethera.net>2023-09-18 06:16:47 -0300
committerDavid Bremner <david@tethera.net>2023-09-18 06:16:47 -0300
commit1129cf890ef812321ac8296a4ca964a796df0b87 (patch)
treeffe0b3a98a7210c292d94d3ae6c9ebbed70fd4a5 /test/notmuch-test
parent12aa05f07cb8aae736895c46fb25e0106daf207c (diff)
parentd4e0aaa76bd9e7a9e36abf47dc9ad3ea8bc10334 (diff)
Merge remote-tracking branch 'origin/master' into nmwebnmweb
Diffstat (limited to 'test/notmuch-test')
-rwxr-xr-xtest/notmuch-test12
1 files changed, 10 insertions, 2 deletions
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