unofficial mirror of notmuch@notmuchmail.org
 help / color / mirror / code / Atom feed
From: Milton Vandersloot <miltonrobertvandersloot1412@protonmail.com>
To: "notmuch@notmuchmail.org" <notmuch@notmuchmail.org>
Subject: test_emacs_expect_t does ignore Emacs as prerequisite
Date: Sun, 05 Apr 2020 08:37:57 +0000	[thread overview]
Message-ID: <4EC8sDKjAVEjYY1U-bmmhcOzj4Sekf_jKwOaaduMv3Oes4rNecwwrOLmvYbFwjGVd_5BW6PEeK7M0iMUKgOkHEwyETf-mjJqFexnKkqSUNM=@protonmail.com> (raw)

Dear notmuch Developers

test_emacs_expect_t ignores that it needs Emacs as a prerequisite.
It seems (by comparing the logic of this function with the logic of other test_* functions, e.g. test_expect_success) that the test for that was introduced later and forgotten in this method.
There might also be more places/other test_* methods which miss this check but I have not checked that as I'm not familiar with the codebase.
Below is a patch for the test_emacs_expect_t function.

Regards
Milton

[PATCH] Let test_emacs_expect_t respect missing external prerequisites

test_emacs_expect_t did not test for missing prerequisites (even though
it called test_emacs which does it). Fix that by testing for missing
prerequisites.

--- a/test/test-lib.sh
+++ b/test/test-lib.sh
@@ -548,6 +548,8 @@ test_emacs_expect_t () {
 		inside_subtest=

 		# Report success/failure.
+		test_check_missing_external_prereqs_ "$test_subtest_name" ||
+		{
 		result=$(cat OUTPUT)
 		if [ "$result" = t ]
 		then
@@ -555,6 +557,7 @@ test_emacs_expect_t () {
 		else
 			test_failure_ "${result}"
 		fi
+		}
 	else
 		# Restore state after the (non) test.
 		exec 1>&6 2>&7		# Restore stdout and stderr


             reply	other threads:[~2020-04-05 19:49 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-04-05  8:37 Milton Vandersloot [this message]
2020-04-24 10:29 ` test_emacs_expect_t does ignore Emacs as prerequisite David Bremner
2020-04-26  8:12   ` Tomi Ollila

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='4EC8sDKjAVEjYY1U-bmmhcOzj4Sekf_jKwOaaduMv3Oes4rNecwwrOLmvYbFwjGVd_5BW6PEeK7M0iMUKgOkHEwyETf-mjJqFexnKkqSUNM=@protonmail.com' \
    --to=miltonrobertvandersloot1412@protonmail.com \
    --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).