From: Milton Vandersloot <miltonrobertvandersloot1412@protonmail.com>
To: "notmuch@notmuchmail.org" <notmuch@notmuchmail.org>
Subject: Mark Emacs as prerequisite for tests which require it
Date: Sun, 05 Apr 2020 08:37:14 +0000 [thread overview]
Message-ID: <NL_Di4YUqTedH1QQtFWnG4M2ZSV3qrZVDPRe1GgRDzMA6q0K1iAYO0plk_b-2KNREfkTS4jrBXlrAQGxz7ZP-il0Ojn966hScXRrLEKf3-c=@protonmail.com> (raw)
Dear notmuch developers
The notmuch test suite depends on some external dependencies to finish successfully (i.e. no failures but maybe some skips), one of them being Emacs.
As I had no Emacs installed, I discovered that some tests fail and do not state properly that Emacs is needed for them.
Below are small sed commands (was easier this way) which put the "test_require_external_prereq emacs" to the missing places.
For some tests (those which test Emacs capabilities) it is clear that Emacs is a necessity, some tests in particular the crypto tests (T350, T355, T357) do require Emacs only for generating a initial mail to index/test on. Here it would in my opinion be better to find an alternative way of producing that e-mail so these tests can be run without Emacs (That would reduce the long list of test names below tremendously). A promising approach would be using the same idea as the last tests in T357-index-decryption.sh, they use "add_email_corpus crypto" for (what seems to me) populating the mail archive.
Regards
Milton
# Mark tests properly which require Emacs
# (some of them rely on Emacs to generate an test e-mail)
sed -i -e '\:^\..*/test-lib.sh: a test_require_external_prereq emacs' \
test/T310-emacs.sh \
test/T350-crypto.sh \
test/T355-smime.sh \
test/T450-emacs-show.sh \
test/T460-emacs-tree.sh \
test/T730-emacs-forwarding.sh
# Most tests in test/T357-index-decryption.sh require a working Emacs.
# However, a couple of tests at the end do not.
# Mark the tests needing Emacs properly.
for testname in \
'emacs delivery of encrypted message' \
"search for unindexed cleartext" \
'emacs delivery of encrypted message' \
"emacs delivery of encrypted message, indexed cleartext" \
"emacs search by property for one message" \
"show the message body of the encrypted message" \
"message should go away after deletion" \
"message cleartext not present after insert" \
"stash decryption during show" \
"search should now find the contents" \
"message cleartext is present after reinserting with --decrypt=true" \
"delete all copies of the message" \
"message cleartext is present with insert --decrypt=true" \
'tagging all messages' \
"verify that tags have not changed" \
'reindex old messages' \
"reindexed encrypted message, including cleartext" \
"emacs search by property for both messages" \
'reindex in auto mode' \
"reindexed encrypted messages, should not have changed" \
'reindex without cleartext' \
"reindexed encrypted messages, without cleartext" \
'reindex using only session keys' \
"reindexed encrypted messages, decrypting only with session keys" \
"emacs search by property with both messages unindexed" \
"verify that tags remain without cleartext" \
"index cleartext without keeping session keys" \
"Ensure that the indexed terms are present" \
"show one of the messages with --decrypt=true" \
"Ensure that we cannot show the message with --decrypt=auto" \
; do
sed -e "/test_begin_subtest [\"']${testname}[\"']/ a test_require_external_prereq emacs" \
-i test/T357-index-decryption.sh \
|| echo "Failed: Marking test ${testname} for skipping."
done
next reply other threads:[~2020-04-05 19:49 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-04-05 8:37 Milton Vandersloot [this message]
2021-08-02 18:02 ` Mark Emacs as prerequisite for tests which require it 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='NL_Di4YUqTedH1QQtFWnG4M2ZSV3qrZVDPRe1GgRDzMA6q0K1iAYO0plk_b-2KNREfkTS4jrBXlrAQGxz7ZP-il0Ojn966hScXRrLEKf3-c=@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).