aboutsummaryrefslogtreecommitdiff
path: root/test/test-lib.sh
diff options
context:
space:
mode:
authorJani Nikula <jani@nikula.org>2017-09-25 23:38:21 +0300
committerDavid Bremner <david@tethera.net>2017-10-20 19:53:31 -0300
commite1bd4f23634a88a49256c74e0780dd1dcdb852cd (patch)
treec2254caeb638645debe7387dccb2b7b9ce7c7737 /test/test-lib.sh
parentfd36ae9f514520e85d9e43d4aa08263b3a5a8d3e (diff)
test: check for notmuch binary in test-lib.sh
Move notmuch executable check into common code. Redundant for notmuch-test runs, but works also for individual tests.
Diffstat (limited to 'test/test-lib.sh')
-rw-r--r--test/test-lib.sh7
1 files changed, 7 insertions, 0 deletions
diff --git a/test/test-lib.sh b/test/test-lib.sh
index 84051bc9..9f0d7e02 100644
--- a/test/test-lib.sh
+++ b/test/test-lib.sh
@@ -26,6 +26,13 @@ fi
# Make sure echo builtin does not expand backslash-escape sequences by default.
shopt -u xpg_echo
+# It appears that people try to run tests without building...
+if ! test -x ../notmuch
+then
+ echo >&2 'You do not seem to have built notmuch yet.'
+ exit 1
+fi
+
this_test=${0##*/}
this_test=${this_test%.sh}
this_test_bare=${this_test#T[0-9][0-9][0-9]-}