Discussion:
[PATCH 2/2] test: make regexp test conditional on field processors
David Bremner
2018-09-10 01:36:17 UTC
Permalink
Normally we'd mark it broken, but perversely missing regexp support
actually makes the test pass.
---
test/T670-duplicate-mid.sh | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/test/T670-duplicate-mid.sh b/test/T670-duplicate-mid.sh
index bf8cc3a8..fd7df057 100755
--- a/test/T670-duplicate-mid.sh
+++ b/test/T670-duplicate-mid.sh
@@ -48,7 +48,11 @@ notmuch search --output=files subject:'"message 2"' | notmuch_dir_sanitize > OUT
test_expect_equal_file EXPECTED OUTPUT

test_begin_subtest 'Regexp search for second subject'
-test_subtest_known_broken
+# Note that missing field processor support really means the test
+# doesn't make sense, but it happens to pass.
+if [ $NOTMUCH_HAVE_XAPIAN_FIELD_PROCESSOR -eq 1 ]; then
+ test_subtest_known_broken
+fi
cat <<EOF >EXPECTED
MAIL_DIR/copy0
MAIL_DIR/copy1
--
2.18.0
David Bremner
2018-09-10 01:36:16 UTC
Permalink
Currently these tests just fail when notmuch is built against Xapian
1.2.x
---
test/T585-thread-subquery.sh | 12 ++++++++++++
1 file changed, 12 insertions(+)

diff --git a/test/T585-thread-subquery.sh b/test/T585-thread-subquery.sh
index 71ced149..bf9894d3 100755
--- a/test/T585-thread-subquery.sh
+++ b/test/T585-thread-subquery.sh
@@ -14,6 +14,9 @@ count=$(notmuch count from:keithp and to:keithp)
test_expect_equal 0 "$count"

test_begin_subtest "Same query against threads"
+if [ $NOTMUCH_HAVE_XAPIAN_FIELD_PROCESSOR -eq 0 ]; then
+ test_subtest_known_broken
+fi
notmuch search thread:{from:keithp} and thread:{to:keithp} | notmuch_search_sanitize > OUTPUT
cat<<EOF > EXPECTED
thread:XXX 2009-11-18 [7/7] Lars Kellogg-Stedman, Mikhail Gusarov, Keith Packard, Carl Worth; [notmuch] Working with Maildir storage? (inbox signed unread)
@@ -21,6 +24,9 @@ EOF
test_expect_equal_file EXPECTED OUTPUT

test_begin_subtest "Mix thread and non-threads query"
+if [ $NOTMUCH_HAVE_XAPIAN_FIELD_PROCESSOR -eq 0 ]; then
+ test_subtest_known_broken
+fi
notmuch search thread:{from:keithp} and to:keithp | notmuch_search_sanitize > OUTPUT
cat<<EOF > EXPECTED
thread:XXX 2009-11-18 [1/7] Lars Kellogg-Stedman| Mikhail Gusarov, Keith Packard, Carl Worth; [notmuch] Working with Maildir storage? (inbox signed unread)
@@ -28,6 +34,9 @@ EOF
test_expect_equal_file EXPECTED OUTPUT

test_begin_subtest "Compound subquery"
+if [ $NOTMUCH_HAVE_XAPIAN_FIELD_PROCESSOR -eq 0 ]; then
+ test_subtest_known_broken
+fi
notmuch search 'thread:"{from:keithp and date:2009}" and thread:{to:keithp}' | notmuch_search_sanitize > OUTPUT
cat<<EOF > EXPECTED
thread:XXX 2009-11-18 [7/7] Lars Kellogg-Stedman, Mikhail Gusarov, Keith Packard, Carl Worth; [notmuch] Working with Maildir storage? (inbox signed unread)
@@ -35,6 +44,9 @@ EOF
test_expect_equal_file EXPECTED OUTPUT

test_begin_subtest "Syntax/quoting error in subquery"
+if [ $NOTMUCH_HAVE_XAPIAN_FIELD_PROCESSOR -eq 0 ]; then
+ test_subtest_known_broken
+fi
notmuch search 'thread:{from:keithp and date:2009} and thread:{to:keithp}' 1>OUTPUT 2>&1
cat<<EOF > EXPECTED
notmuch search: A Xapian exception occurred
--
2.18.0
Tomi Ollila
2018-09-13 21:25:37 UTC
Permalink
Some bit rot crept in, and the test suite no longer passes on Xapian
without field processors. The fix is simple enough not to pull the
plug on support for old Xapian just yet.
Fine by me. Also dropping xapian 1.2.x support is fine by me
(so that I have to have a reason to upgrade >;)

Tomi
David Bremner
2018-09-15 00:01:18 UTC
Permalink
Post by Tomi Ollila
Some bit rot crept in, and the test suite no longer passes on Xapian
without field processors. The fix is simple enough not to pull the
plug on support for old Xapian just yet.
Fine by me. Also dropping xapian 1.2.x support is fine by me
(so that I have to have a reason to upgrade >;)
For now, xapian 1.2.x support lives ;). Pushed this series to master.

d

Loading...