unofficial mirror of notmuch@notmuchmail.org
 help / color / mirror / code / Atom feed
* update test suite for xapian 1.3
@ 2016-01-29 11:53 David Bremner
  2016-01-29 11:53 ` [PATCH 1/3] test: replace single giant term with large phrase David Bremner
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: David Bremner @ 2016-01-29 11:53 UTC (permalink / raw)
  To: notmuch

Without these patches, only two tests fail. Both fixes are fairly
trivial. According to Olly the behviour of xapian 1.3.4 of throwing an
exception rather than optimising away a giant term is a bug, but it is
easy to work around since we aren't really interested in giant terms
per se in the test, just long query strings.

To test this on Debian

apt-get install -t experimental libxapian-dev
XAPIAN_CONFIG=xapian-config-1.3 ./configure
make test

Currently the libxapian-dev packages are not coinstallable (although
the actual libraries are). But downgrading back to stretch version
worked fine for me.

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

* [PATCH 1/3] test: replace single giant term with large phrase
  2016-01-29 11:53 update test suite for xapian 1.3 David Bremner
@ 2016-01-29 11:53 ` David Bremner
  2016-01-29 11:53 ` [PATCH 2/3] test: fix typo in informational message David Bremner
  2016-01-29 11:53 ` [PATCH 3/3] test: canonicalize quotes in xapian error messages David Bremner
  2 siblings, 0 replies; 6+ messages in thread
From: David Bremner @ 2016-01-29 11:53 UTC (permalink / raw)
  To: notmuch

We only need a long string, not a single long term to trigger batch
mode.  The giant term triggers a bug/incompatibility in Xapian 1.3.4
that throws an exception because it is longer than the Xapian term size
limit.
---
 test/T310-emacs.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/test/T310-emacs.sh b/test/T310-emacs.sh
index 61bc369..42e3140 100755
--- a/test/T310-emacs.sh
+++ b/test/T310-emacs.sh
@@ -130,7 +130,7 @@ test_expect_equal "$output" "thread:XXX   2009-11-18 [4/4] Jjgod Jiang, Alexande
 test_begin_subtest "Add tag (large query)"
 # We use a long query to force us into batch mode and use a funny tag
 # that requires escaping for batch tagging.
-test_emacs "(notmuch-tag (concat \"$os_x_darwin_thread\" \" or \" (make-string notmuch-tag-argument-limit ?x)) (list \"+tag-from-%-large-query\"))"
+test_emacs "(notmuch-tag (concat \"$os_x_darwin_thread\" \" or \" (mapconcat #'identity (make-list notmuch-tag-argument-limit \"x\") \"-\")) (list \"+tag-from-%-large-query\"))"
 output=$(notmuch search $os_x_darwin_thread | notmuch_search_sanitize)
 test_expect_equal "$output" "thread:XXX   2009-11-18 [4/4] Jjgod Jiang, Alexander Botero-Lowry; [notmuch] Mac OS X/Darwin compatibility issues (inbox tag-from-%-large-query unread)"
 notmuch tag -tag-from-%-large-query $os_x_darwin_thread
-- 
2.6.4

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

* [PATCH 2/3] test: fix typo in informational message
  2016-01-29 11:53 update test suite for xapian 1.3 David Bremner
  2016-01-29 11:53 ` [PATCH 1/3] test: replace single giant term with large phrase David Bremner
@ 2016-01-29 11:53 ` David Bremner
  2016-02-13 16:44   ` David Bremner
  2016-01-29 11:53 ` [PATCH 3/3] test: canonicalize quotes in xapian error messages David Bremner
  2 siblings, 1 reply; 6+ messages in thread
From: David Bremner @ 2016-01-29 11:53 UTC (permalink / raw)
  To: notmuch

Thanks to Olly Betts for noticing
---
 test/Makefile.local | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/test/Makefile.local b/test/Makefile.local
index 2b18691..30d420e 100644
--- a/test/Makefile.local
+++ b/test/Makefile.local
@@ -57,7 +57,7 @@ test-binaries: $(TEST_BINARIES)
 
 test:	all test-binaries
 ifeq ($V,)
-	@echo 'Use "$(MAKE) V=1" to print test headings and PASSIng results.'
+	@echo 'Use "$(MAKE) V=1" to print test headings and PASSing results.'
 	@env NOTMUCH_TEST_QUIET=1 ${test_src_dir}/notmuch-test $(OPTIONS)
 else
 # The user has explicitly enabled quiet execution.
-- 
2.6.4

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

* [PATCH 3/3] test: canonicalize quotes in xapian error messages
  2016-01-29 11:53 update test suite for xapian 1.3 David Bremner
  2016-01-29 11:53 ` [PATCH 1/3] test: replace single giant term with large phrase David Bremner
  2016-01-29 11:53 ` [PATCH 2/3] test: fix typo in informational message David Bremner
@ 2016-01-29 11:53 ` David Bremner
  2016-03-14 23:29   ` David Bremner
  2 siblings, 1 reply; 6+ messages in thread
From: David Bremner @ 2016-01-29 11:53 UTC (permalink / raw)
  To: notmuch

These differ between 1.2 and 1.3, so we transform the 1.2 backquote to a
single quote for compatibility
---
 test/T360-symbol-hiding.sh | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/test/T360-symbol-hiding.sh b/test/T360-symbol-hiding.sh
index 4ec0ea6..89e7f16 100755
--- a/test/T360-symbol-hiding.sh
+++ b/test/T360-symbol-hiding.sh
@@ -15,11 +15,11 @@ test_begin_subtest 'running test' run_test
 mkdir -p ${PWD}/fakedb/.notmuch
 ( LD_LIBRARY_PATH="$TEST_DIRECTORY/../lib${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}" \
 		 $TEST_DIRECTORY/symbol-test ${PWD}/fakedb ${PWD}/nonexistent \
-		 2>&1 | sed "s,${PWD},CWD,g") > OUTPUT
+		 2>&1 | notmuch_dir_sanitize | sed "s,\`,\',g") > OUTPUT
 
 cat <<EOF > EXPECTED
 A Xapian exception occurred opening database: Couldn't stat 'CWD/fakedb/.notmuch/xapian'
-caught No chert database found at path \`CWD/nonexistent'
+caught No chert database found at path 'CWD/nonexistent'
 EOF
 test_expect_equal_file EXPECTED OUTPUT
 
-- 
2.6.4

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

* Re: [PATCH 2/3] test: fix typo in informational message
  2016-01-29 11:53 ` [PATCH 2/3] test: fix typo in informational message David Bremner
@ 2016-02-13 16:44   ` David Bremner
  0 siblings, 0 replies; 6+ messages in thread
From: David Bremner @ 2016-02-13 16:44 UTC (permalink / raw)
  To: notmuch

David Bremner <david@tethera.net> writes:

> Thanks to Olly Betts for noticing
> ---
>  test/Makefile.local | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/test/Makefile.local b/test/Makefile.local
> index 2b18691..30d420e 100644
> --- a/test/Makefile.local
> +++ b/test/Makefile.local
> @@ -57,7 +57,7 @@ test-binaries: $(TEST_BINARIES)
>  
>  test:	all test-binaries
>  ifeq ($V,)
> -	@echo 'Use "$(MAKE) V=1" to print test headings and PASSIng results.'
> +	@echo 'Use "$(MAKE) V=1" to print test headings and PASSing results.'
>  	@env NOTMUCH_TEST_QUIET=1 ${test_src_dir}/notmuch-test $(OPTIONS)
>  else
>  # The user has explicitly enabled quiet execution.
> -- 
> 2.6.4

pushed.

d

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

* Re: [PATCH 3/3] test: canonicalize quotes in xapian error messages
  2016-01-29 11:53 ` [PATCH 3/3] test: canonicalize quotes in xapian error messages David Bremner
@ 2016-03-14 23:29   ` David Bremner
  0 siblings, 0 replies; 6+ messages in thread
From: David Bremner @ 2016-03-14 23:29 UTC (permalink / raw)
  To: notmuch

David Bremner <david@tethera.net> writes:

> These differ between 1.2 and 1.3, so we transform the 1.2 backquote to a
> single quote for compatibility

pushed the remaining to 2 patches. We can now claim to support xapian
1.3, although it would be nice if configure knew about xapian-config-1.3

d

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

end of thread, other threads:[~2016-03-14 23:29 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-01-29 11:53 update test suite for xapian 1.3 David Bremner
2016-01-29 11:53 ` [PATCH 1/3] test: replace single giant term with large phrase David Bremner
2016-01-29 11:53 ` [PATCH 2/3] test: fix typo in informational message David Bremner
2016-02-13 16:44   ` David Bremner
2016-01-29 11:53 ` [PATCH 3/3] test: canonicalize quotes in xapian error messages David Bremner
2016-03-14 23:29   ` David Bremner

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