[PATCH] test: Produce useful output when the HTML with images test fails

Tomi Ollila tomi.ollila at iki.fi
Wed Nov 21 00:09:51 PST 2012


On Tue, Nov 20 2012, Austin Clements <amdragon at 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 at notmuchmail.org
> http://notmuchmail.org/mailman/listinfo/notmuch


More information about the notmuch mailing list