unofficial mirror of notmuch@notmuchmail.org
 help / color / mirror / code / Atom feed
From: Felipe Contreras <felipe.contreras@gmail.com>
To: notmuch@notmuchmail.org
Cc: Daniel Kahn Gillmor <dkg@fifthhorseman.net>
Subject: [PATCH v2 3/6] test: emacs: simplify missing dependencies check
Date: Sat, 15 May 2021 15:47:41 -0500	[thread overview]
Message-ID: <20210515204744.965206-4-felipe.contreras@gmail.com> (raw)
In-Reply-To: <20210515204744.965206-1-felipe.contreras@gmail.com>

No functional changes.

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
---
 test/test-lib.sh | 14 ++++++--------
 1 file changed, 6 insertions(+), 8 deletions(-)

diff --git a/test/test-lib.sh b/test/test-lib.sh
index c1395c87..e1a597f7 100644
--- a/test/test-lib.sh
+++ b/test/test-lib.sh
@@ -115,9 +115,11 @@ unset EMAIL
 unset NAME
 
 test_require_emacs () {
-    test_require_external_prereq emacs
-    test_require_external_prereq ${TEST_EMACSCLIENT}
-    test_require_external_prereq dtach
+    local ret=0
+    test_require_external_prereq emacs || ret=1
+    test_require_external_prereq ${TEST_EMACSCLIENT} || ret=1
+    test_require_external_prereq dtach || ret=1
+    return $ret
 }
 
 add_gnupg_home () {
@@ -1048,11 +1050,7 @@ EOF
 
 test_emacs () {
 	# test dependencies beforehand to avoid the waiting loop below
-	missing_dependencies=
-	test_require_external_prereq dtach || missing_dependencies=1
-	test_require_external_prereq emacs || missing_dependencies=1
-	test_require_external_prereq ${TEST_EMACSCLIENT} || missing_dependencies=1
-	test -z "$missing_dependencies" || return
+	test_require_emacs || return
 
 	if [ -z "$EMACS_SERVER" ]; then
 		emacs_tests="$NOTMUCH_SRCDIR/test/${this_test_bare}.el"
-- 
2.31.1

  parent reply	other threads:[~2021-05-15 20:48 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-15 20:47 [PATCH v2 0/6] test: several cleanups Felipe Contreras
2021-05-15 20:47 ` [PATCH v2 1/6] test: trivial style cleanups Felipe Contreras
2021-05-15 20:47 ` [PATCH v2 2/6] test: more style fixes Felipe Contreras
2021-05-16 12:08   ` David Bremner
2021-05-16 18:16     ` Felipe Contreras
2021-05-17 11:16       ` David Bremner
2021-05-15 20:47 ` Felipe Contreras [this message]
2021-05-15 20:47 ` [PATCH v2 4/6] test: emacs: check for configured emacs Felipe Contreras
2021-05-15 20:47 ` [PATCH v2 5/6] test: emacs: fix a couple of shellcheck complaints Felipe Contreras
2021-05-15 20:47 ` [PATCH v2 6/6] test: split emacs functionality to its own file Felipe Contreras
2021-05-17 11:17 ` [PATCH v2 0/6] test: several cleanups David Bremner

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://notmuchmail.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210515204744.965206-4-felipe.contreras@gmail.com \
    --to=felipe.contreras@gmail.com \
    --cc=dkg@fifthhorseman.net \
    --cc=notmuch@notmuchmail.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://yhetil.org/notmuch.git/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).