From: Michael J Gruber <git@grubix.eu>
To: notmuch@notmuchmail.org
Subject: [PATCH] test: allow to use --full-sync
Date: Wed, 16 Feb 2022 10:52:35 +0100 [thread overview]
Message-ID: <8ab69ee29faf9322c5ba25ac0fe320ca17f67490.1645005076.git.git@grubix.eu> (raw)
In-Reply-To: <164493828675.3239.10351078681225652378.git@grubix.eu>
Some build infrastructure appears to habe problems with mtime/stat,
leading to spurious failures (noticed on s390x and aarch64 with epel8).
Allow the test suite to be run with --full-sync so that release builds
can use the test suite while avoiding spurious failures.
Signed-off-by: Michael J Gruber <git@grubix.eu>
---
test/README | 8 ++++++++
test/test-lib-common.sh | 7 ++++++-
test/test-lib.sh | 2 +-
3 files changed, 15 insertions(+), 2 deletions(-)
diff --git a/test/README b/test/README
index 10f127cb..1de79b78 100644
--- a/test/README
+++ b/test/README
@@ -110,6 +110,14 @@ printed on screen. This printing can be disabled by setting the
NOTMUCH_TEST_QUIET variable to a non-null value. Message on test
failures and skips are still printed.
+File system/mtime issues
+------------------------
+Normally, `notmuch new` uses directory modification times, and the test
+suite checks that this works. If you encounter spurious test failures
+where messages added by one subtest appear to show up in the next subtest
+only (indicating mtime/stat problems) you can set NOTMUCH_TEST_FULLSYNC
+so that the test suite uses the --full-sync option of notmuch new.
+
Skipping Tests
--------------
If, for any reason, you need to skip one or more tests, you can do so
diff --git a/test/test-lib-common.sh b/test/test-lib-common.sh
index ebbf4cdf..91039478 100644
--- a/test/test-lib-common.sh
+++ b/test/test-lib-common.sh
@@ -29,6 +29,11 @@ if [[ -z "$NOTMUCH_SRCDIR" ]] || [[ -z "$NOTMUCH_BUILDDIR" ]]; then
exit 1
fi
+if test -n "$NOTMUCH_TEST_FULLSCAN"
+then
+ NOTMUCH_NEW_OPTIONS="--full-scan"
+fi
+
backup_database () {
test_name=$(basename $0 .sh)
rm -rf $TMP_DIRECTORY/notmuch-dir-backup."$test_name"
@@ -226,7 +231,7 @@ EOF
# are also supported here, so see that function for details.
add_message () {
generate_message "$@" &&
- notmuch new > /dev/null
+ notmuch new $NOTMUCH_NEW_OPTIONS > /dev/null
}
if test -n "$valgrind"
diff --git a/test/test-lib.sh b/test/test-lib.sh
index 833bf5fe..0167b95f 100644
--- a/test/test-lib.sh
+++ b/test/test-lib.sh
@@ -521,7 +521,7 @@ test_json_nodes () {
}
NOTMUCH_NEW () {
- notmuch new "${@}" | grep -v -E -e '^Processed [0-9]*( total)? file|Found [0-9]* total file'
+ notmuch new $NOTMUCH_NEW_OPTIONS "${@}" | grep -v -E -e '^Processed [0-9]*( total)? file|Found [0-9]* total file'
}
NOTMUCH_DUMP_TAGS () {
--
2.35.1.476.gacce7e407c
next prev parent reply other threads:[~2022-02-16 9:52 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-02-11 13:55 Test suite timing issues? Michael J Gruber
2022-02-11 14:04 ` Michael J Gruber
2022-02-12 0:03 ` David Bremner
2022-02-12 13:32 ` Michael J Gruber
2022-02-12 14:30 ` David Bremner
2022-02-12 15:06 ` Tomi Ollila
2022-02-12 15:29 ` David Bremner
2022-02-12 19:40 ` David Bremner
2022-02-12 20:45 ` Tomi Ollila
2022-02-12 20:54 ` Michael J Gruber
2022-02-12 21:09 ` David Bremner
2022-02-12 21:53 ` Michael J Gruber
2022-02-12 22:14 ` Tomi Ollila
2022-02-13 8:29 ` Tomi Ollila
2022-02-14 14:01 ` David Bremner
2022-02-14 14:48 ` Tomi Ollila
2022-02-14 22:53 ` Tomi Ollila
2022-02-15 8:51 ` Michael J Gruber
2022-02-15 15:18 ` Michael J Gruber
2022-02-16 9:52 ` Michael J Gruber [this message]
2022-02-16 13:04 ` [PATCH] test: allow to use --full-sync David Bremner
2022-02-16 15:53 ` Michael J Gruber
2022-02-16 21:17 ` Tomi Ollila
2022-02-16 22:01 ` Tomi Ollila
2022-02-17 12:26 ` 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=8ab69ee29faf9322c5ba25ac0fe320ca17f67490.1645005076.git.git@grubix.eu \
--to=git@grubix.eu \
--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).