]> git.notmuchmail.org Git - notmuch/commitdiff
test: check for notmuch binary in test-lib.sh
authorJani Nikula <jani@nikula.org>
Mon, 25 Sep 2017 20:38:21 +0000 (23:38 +0300)
committerDavid Bremner <david@tethera.net>
Fri, 20 Oct 2017 22:53:31 +0000 (19:53 -0300)
Move notmuch executable check into common code. Redundant for
notmuch-test runs, but works also for individual tests.

test/T000-basic.sh
test/test-lib.sh

index d514082d48e3b4539759fe6d0fc277b4ba572491..f3808c0753a26b932c445583bc1ab861fbcc342c 100755 (executable)
@@ -4,16 +4,6 @@
 #
 
 test_description='the test framework itself.'
-
-################################################################
-# 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
-
 . $(dirname "$0")/test-lib.sh || exit 1
 
 ################################################################
index 84051bc90ac09ce74dd788918a05181d693f8bef..9f0d7e02a3d940454edf1e5b71888e6a4e6815ed 100644 (file)
@@ -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]-}