unofficial mirror of notmuch@notmuchmail.org
 help / color / mirror / code / Atom feed
* [PATCH] test: Produce useful output when the HTML with images test fails
@ 2012-11-20 15:58 Austin Clements
  2012-11-21  8:09 ` Tomi Ollila
  2012-11-22 19:13 ` David Bremner
  0 siblings, 2 replies; 5+ messages in thread
From: Austin Clements @ 2012-11-20 15:58 UTC (permalink / raw)
  To: notmuch

Previously, this would simply indicate that the grep failed without
any indication of the Emacs output it failed on.  Now we take
advantage of the test framework's handling of stdout to display the
incorrect Emacs output if the test fails.
---

Besides being a good idea in general, this is the first step toward
fixing this test on the Notmuch buildbot, since right now there's no
indication of why it's failing.

 test/emacs |    5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/test/emacs b/test/emacs
index 77265b0..5649d55 100755
--- a/test/emacs
+++ b/test/emacs
@@ -809,9 +809,10 @@ test_emacs "(let ((mm-text-html-renderer
 	      (notmuch-show \"id:${gen_msg_id}\"))
 	    (test-output)" > /dev/null
 # Different Emacs versions and renderers give very different results,
-# so just check that something reasonable showed up.
+# so just check that something reasonable showed up.  We first cat the
+# output so the test framework will print it if the test fails.
 test_expect_success "Rendering HTML mail with images" \
-    'grep -q smiley OUTPUT'
+    'cat OUTPUT && grep -q smiley OUTPUT'
 
 
 test_done
-- 
1.7.10.4

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

* Re: [PATCH] test: Produce useful output when the HTML with images test fails
  2012-11-20 15:58 [PATCH] test: Produce useful output when the HTML with images test fails Austin Clements
@ 2012-11-21  8:09 ` Tomi Ollila
  2012-11-21  8:25   ` Tomi Ollila
  2012-11-22 19:13 ` David Bremner
  1 sibling, 1 reply; 5+ messages in thread
From: Tomi Ollila @ 2012-11-21  8:09 UTC (permalink / raw)
  To: Austin Clements, Tom Prince; +Cc: notmuch

On Tue, Nov 20 2012, Austin Clements <amdragon@MIT.EDU> wrote:

> Previously, this would simply indicate that the grep failed without
> any indication of the Emacs output it failed on.  Now we take
> advantage of the test framework's handling of stdout to display the
> incorrect Emacs output if the test fails.
> ---
>
> Besides being a good idea in general, this is the first step toward
> fixing this test on the Notmuch buildbot, since right now there's no
> indication of why it's failing.

Tom: could you do separate test on the buildbot machine (master-emacs24
config) with this patch applied and then running
NOTMUCH_TESTS=emacs make test

Tomi

>  test/emacs |    5 +++--
>  1 file changed, 3 insertions(+), 2 deletions(-)
>
> diff --git a/test/emacs b/test/emacs
> index 77265b0..5649d55 100755
> --- a/test/emacs
> +++ b/test/emacs
> @@ -809,9 +809,10 @@ test_emacs "(let ((mm-text-html-renderer
>  	      (notmuch-show \"id:${gen_msg_id}\"))
>  	    (test-output)" > /dev/null
>  # Different Emacs versions and renderers give very different results,
> -# so just check that something reasonable showed up.
> +# so just check that something reasonable showed up.  We first cat the
> +# output so the test framework will print it if the test fails.
>  test_expect_success "Rendering HTML mail with images" \
> -    'grep -q smiley OUTPUT'
> +    'cat OUTPUT && grep -q smiley OUTPUT'
>  
>  
>  test_done
> -- 
> 1.7.10.4
>
> _______________________________________________
> notmuch mailing list
> notmuch@notmuchmail.org
> http://notmuchmail.org/mailman/listinfo/notmuch

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

* Re: [PATCH] test: Produce useful output when the HTML with images test fails
  2012-11-21  8:09 ` Tomi Ollila
@ 2012-11-21  8:25   ` Tomi Ollila
  2012-11-21  8:31     ` Tomi Ollila
  0 siblings, 1 reply; 5+ messages in thread
From: Tomi Ollila @ 2012-11-21  8:25 UTC (permalink / raw)
  To: Austin Clements, Tom Prince; +Cc: notmuch

On Wed, Nov 21 2012, Tomi Ollila <tomi.ollila@iki.fi> wrote:

> On Tue, Nov 20 2012, Austin Clements <amdragon@MIT.EDU> wrote:
>
>> Previously, this would simply indicate that the grep failed without
>> any indication of the Emacs output it failed on.  Now we take
>> advantage of the test framework's handling of stdout to display the
>> incorrect Emacs output if the test fails.
>> ---
>>
>> Besides being a good idea in general, this is the first step toward
>> fixing this test on the Notmuch buildbot, since right now there's no
>> indication of why it's failing.
>
> Tom: could you do separate test on the buildbot machine (master-emacs24
> config) with this patch applied and then running
> NOTMUCH_TESTS=emacs make test

Hmm, I just remembered something:

From notmuch IRC log Thu Oct 25 2012

--8<----8<----8<----8<----8<----8<----8<----8<----8<----8<----8<--
< Domo_> For me the 'shr test fails by missing libxml-parse-html-region ...
< Domo_> which is defined in src/xml.c -- and exists by default on 
         another emacs...
< Domo_> which probably means that my self-compiled emacs24 just doesn't 
         have that xml code compiled in :(
< Domo_> #ifdef HAVE_LIBXML2
< Domo_> ...
< Domo_> #endif /* HAVE_LIBXML2 */
--8<----8<----8<----8<----8<----8<----8<----8<----8<----8<----8<--

So, this is something to be checked for -- installing 
libxml2-devel-2.7.6-8.el6_3.3.x86_64 (on Scientific Linux 6 machine)
and rebuilding emacs made things work for me.

I'd guess the recipe to build emacs 24 on gentoo had this dependency
but maybe emacs24 is so new that at the time buildbot machine got
emacs24 that wasn't there yet ???

Tomi

>
> Tomi
>
>>  test/emacs |    5 +++--
>>  1 file changed, 3 insertions(+), 2 deletions(-)
>>
>> diff --git a/test/emacs b/test/emacs
>> index 77265b0..5649d55 100755
>> --- a/test/emacs
>> +++ b/test/emacs
>> @@ -809,9 +809,10 @@ test_emacs "(let ((mm-text-html-renderer
>>  	      (notmuch-show \"id:${gen_msg_id}\"))
>>  	    (test-output)" > /dev/null
>>  # Different Emacs versions and renderers give very different results,
>> -# so just check that something reasonable showed up.
>> +# so just check that something reasonable showed up.  We first cat the
>> +# output so the test framework will print it if the test fails.
>>  test_expect_success "Rendering HTML mail with images" \
>> -    'grep -q smiley OUTPUT'
>> +    'cat OUTPUT && grep -q smiley OUTPUT'
>>  
>>  
>>  test_done
>> -- 
>> 1.7.10.4
>>
>> _______________________________________________
>> notmuch mailing list
>> notmuch@notmuchmail.org
>> http://notmuchmail.org/mailman/listinfo/notmuch

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

* Re: [PATCH] test: Produce useful output when the HTML with images test fails
  2012-11-21  8:25   ` Tomi Ollila
@ 2012-11-21  8:31     ` Tomi Ollila
  0 siblings, 0 replies; 5+ messages in thread
From: Tomi Ollila @ 2012-11-21  8:31 UTC (permalink / raw)
  To: Austin Clements, Tom Prince; +Cc: notmuch

On Wed, Nov 21 2012, Tomi Ollila <tomi.ollila@iki.fi> wrote:
>
> From notmuch IRC log Thu Oct 25 2012
>
> --8<----8<----8<----8<----8<----8<----8<----8<----8<----8<----8<--
> < Domo_> For me the 'shr test fails by missing libxml-parse-html-region ...
> < Domo_> which is defined in src/xml.c -- and exists by default on 
>          another emacs...
> < Domo_> which probably means that my self-compiled emacs24 just doesn't 
>          have that xml code compiled in :(
> < Domo_> #ifdef HAVE_LIBXML2
> < Domo_> ...
> < Domo_> #endif /* HAVE_LIBXML2 */
> --8<----8<----8<----8<----8<----8<----8<----8<----8<----8<----8<--

That's easy to test:

run emacs24

Enter

M-x describe-function libxml-parse-html-region

to see whether the function is defined.

The output should look like:

--8<----8<----8<----8<----8<----8<----8<----8<----8<----8<----8<--
libxml-parse-html-region is a built-in function in `C source code'.

(libxml-parse-html-region START END &optional BASE-URL)

Parse the region as an HTML document and return the parse tree.
If BASE-URL is non-nil, it is used to expand relative URLs.
--8<----8<----8<----8<----8<----8<----8<----8<----8<----8<----8<--

Tomi

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

* Re: [PATCH] test: Produce useful output when the HTML with images test fails
  2012-11-20 15:58 [PATCH] test: Produce useful output when the HTML with images test fails Austin Clements
  2012-11-21  8:09 ` Tomi Ollila
@ 2012-11-22 19:13 ` David Bremner
  1 sibling, 0 replies; 5+ messages in thread
From: David Bremner @ 2012-11-22 19:13 UTC (permalink / raw)
  To: Austin Clements, notmuch

Austin Clements <amdragon@MIT.EDU> writes:

> Previously, this would simply indicate that the grep failed without
> any indication of the Emacs output it failed on.  Now we take
> advantage of the test framework's handling of stdout to display the
> incorrect Emacs output if the test fails.

Pushed. Along with a rebuild of emacs on the buildbot, we have all tests
passing on emacs 24.

d

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

end of thread, other threads:[~2012-11-22 19:13 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-11-20 15:58 [PATCH] test: Produce useful output when the HTML with images test fails Austin Clements
2012-11-21  8:09 ` Tomi Ollila
2012-11-21  8:25   ` Tomi Ollila
2012-11-21  8:31     ` Tomi Ollila
2012-11-22 19:13 ` 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).