Test suite fixes for Xapian 1.2.x

classic Classic list List threaded Threaded
5 messages Options
David Bremner-2 David Bremner-2
Reply | Threaded
Open this post in threaded view
|

Test suite fixes for Xapian 1.2.x

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.


_______________________________________________
notmuch mailing list
[hidden email]
https://notmuchmail.org/mailman/listinfo/notmuch
David Bremner-2 David Bremner-2
Reply | Threaded
Open this post in threaded view
|

[PATCH 1/2] test: mark thread subqueries broken without field processors

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

_______________________________________________
notmuch mailing list
[hidden email]
https://notmuchmail.org/mailman/listinfo/notmuch
David Bremner-2 David Bremner-2
Reply | Threaded
Open this post in threaded view
|

[PATCH 2/2] test: make regexp test conditional on field processors

In reply to this post by David Bremner-2
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

_______________________________________________
notmuch mailing list
[hidden email]
https://notmuchmail.org/mailman/listinfo/notmuch
Tomi Ollila-2 Tomi Ollila-2
Reply | Threaded
Open this post in threaded view
|

Re: Test suite fixes for Xapian 1.2.x

In reply to this post by David Bremner-2
On Sun, Sep 09 2018, David Bremner wrote:

> 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
_______________________________________________
notmuch mailing list
[hidden email]
https://notmuchmail.org/mailman/listinfo/notmuch
David Bremner-2 David Bremner-2
Reply | Threaded
Open this post in threaded view
|

Re: Test suite fixes for Xapian 1.2.x

Tomi Ollila <[hidden email]> writes:

> On Sun, Sep 09 2018, David Bremner wrote:
>
>> 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
_______________________________________________
notmuch mailing list
[hidden email]
https://notmuchmail.org/mailman/listinfo/notmuch