[PATCH 05/24] test: check for notmuch binary in test-lib.sh

Jani Nikula jani at nikula.org
Mon Sep 25 13:38:21 PDT 2017


Move notmuch executable check into common code. Redundant for
notmuch-test runs, but works also for individual tests.
---
 test/T000-basic.sh | 10 ----------
 test/test-lib.sh   |  7 +++++++
 2 files changed, 7 insertions(+), 10 deletions(-)

diff --git a/test/T000-basic.sh b/test/T000-basic.sh
index d514082d48e3..f3808c0753a2 100755
--- a/test/T000-basic.sh
+++ b/test/T000-basic.sh
@@ -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
 
 ################################################################
diff --git a/test/test-lib.sh b/test/test-lib.sh
index 350246492d8c..e3b40f21743d 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]-}
-- 
2.11.0



More information about the notmuch mailing list