unofficial mirror of notmuch@notmuchmail.org
 help / color / mirror / code / Atom feed
* test_emacs_expect_t does ignore Emacs as prerequisite
@ 2020-04-05  8:37 Milton Vandersloot
  2020-04-24 10:29 ` David Bremner
  0 siblings, 1 reply; 3+ messages in thread
From: Milton Vandersloot @ 2020-04-05  8:37 UTC (permalink / raw)
  To: notmuch@notmuchmail.org

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


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2020-04-26  8:12 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-04-05  8:37 test_emacs_expect_t does ignore Emacs as prerequisite Milton Vandersloot
2020-04-24 10:29 ` David Bremner
2020-04-26  8:12   ` Tomi Ollila

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).