[PATCH] test: Produce useful output when the HTML with images test fails
authorAustin Clements <amdragon@MIT.EDU>
Tue, 20 Nov 2012 15:58:45 +0000 (10:58 +1900)
committerW. Trevor King <wking@tremily.us>
Fri, 7 Nov 2014 17:50:46 +0000 (09:50 -0800)
d3/3e64c497e7266ebda9436bf8deb34e669ff6a7 [new file with mode: 0644]

diff --git a/d3/3e64c497e7266ebda9436bf8deb34e669ff6a7 b/d3/3e64c497e7266ebda9436bf8deb34e669ff6a7
new file mode 100644 (file)
index 0000000..3b39e65
--- /dev/null
@@ -0,0 +1,104 @@
+Return-Path: <amdragon@mit.edu>\r
+X-Original-To: notmuch@notmuchmail.org\r
+Delivered-To: notmuch@notmuchmail.org\r
+Received: from localhost (localhost [127.0.0.1])\r
+       by olra.theworths.org (Postfix) with ESMTP id 3ABFE431FB6\r
+       for <notmuch@notmuchmail.org>; Tue, 20 Nov 2012 07:58:54 -0800 (PST)\r
+X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
+X-Spam-Flag: NO\r
+X-Spam-Score: -0.7\r
+X-Spam-Level: \r
+X-Spam-Status: No, score=-0.7 tagged_above=-999 required=5\r
+       tests=[RCVD_IN_DNSWL_LOW=-0.7] autolearn=disabled\r
+Received: from olra.theworths.org ([127.0.0.1])\r
+       by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)\r
+       with ESMTP id TnSpKkIjWRFh for <notmuch@notmuchmail.org>;\r
+       Tue, 20 Nov 2012 07:58:53 -0800 (PST)\r
+Received: from dmz-mailsec-scanner-8.mit.edu (DMZ-MAILSEC-SCANNER-8.MIT.EDU\r
+       [18.7.68.37])\r
+       by olra.theworths.org (Postfix) with ESMTP id ADE7C431FAF\r
+       for <notmuch@notmuchmail.org>; Tue, 20 Nov 2012 07:58:53 -0800 (PST)\r
+X-AuditID: 12074425-b7fcc6d00000091f-4b-50aba8bcbc92\r
+Received: from mailhub-auth-4.mit.edu ( [18.7.62.39])\r
+       by dmz-mailsec-scanner-8.mit.edu (Symantec Messaging Gateway) with SMTP\r
+       id 3D.9E.02335.CB8ABA05; Tue, 20 Nov 2012 10:58:52 -0500 (EST)\r
+Received: from outgoing.mit.edu (OUTGOING-AUTH.MIT.EDU [18.7.22.103])\r
+       by mailhub-auth-4.mit.edu (8.13.8/8.9.2) with ESMTP id qAKFwpRG006015; \r
+       Tue, 20 Nov 2012 10:58:51 -0500\r
+Received: from drake.dyndns.org\r
+       (209-6-116-242.c3-0.arl-ubr1.sbo-arl.ma.cable.rcn.com\r
+       [209.6.116.242]) (authenticated bits=0)\r
+       (User authenticated as amdragon@ATHENA.MIT.EDU)\r
+       by outgoing.mit.edu (8.13.6/8.12.4) with ESMTP id qAKFwlpD011155\r
+       (version=TLSv1/SSLv3 cipher=AES256-SHA bits=256 verify=NOT);\r
+       Tue, 20 Nov 2012 10:58:50 -0500 (EST)\r
+Received: from amthrax by drake.dyndns.org with local (Exim 4.77)\r
+       (envelope-from <amdragon@mit.edu>)\r
+       id 1TaqDm-0003eI-Gv; Tue, 20 Nov 2012 10:58:46 -0500\r
+From: Austin Clements <amdragon@MIT.EDU>\r
+To: notmuch@notmuchmail.org\r
+Subject: [PATCH] test: Produce useful output when the HTML with images test\r
+       fails\r
+Date: Tue, 20 Nov 2012 10:58:45 -0500\r
+Message-Id: <1353427125-13854-1-git-send-email-amdragon@mit.edu>\r
+X-Mailer: git-send-email 1.7.10.4\r
+X-Brightmail-Tracker:\r
+ H4sIAAAAAAAAA+NgFlrGIsWRmVeSWpSXmKPExsUixG6nrrtnxeoAg+m7xCxutHYzWly/OZPZ\r
+       gcnj2apbzB5bDr1nDmCK4rJJSc3JLEst0rdL4MqY17yMuWABZ8WNaQ/YGxhXs3cxcnJICJhI\r
+       bDr4hBnCFpO4cG89WxcjF4eQwD5GiTN3JjBCOBsYJfae/A3lPGKSmPj8CyuEM5dRouHTERaQ\r
+       fjYBDYlt+5czgtgiAtISO+/OZgWxmQUsJa5+bWcCsYUFAiVevV8OVs8ioCpx8PMqNhCbV8BB\r
+       YsfT+1B3KEp0P5vANoGRdwEjwypG2ZTcKt3cxMyc4tRk3eLkxLy81CJdC73czBK91JTSTYzg\r
+       4HBR3cE44ZDSIUYBDkYlHt4HCasChFgTy4orcw8xSnIwKYnyGi9fHSDEl5SfUpmRWJwRX1Sa\r
+       k1p8iFGCg1lJhHfHEqAcb0piZVVqUT5MSpqDRUmc90bKTX8hgfTEktTs1NSC1CKYrAwHh5IE\r
+       bz7IUMGi1PTUirTMnBKENBMHJ8hwHqDhk0FqeIsLEnOLM9Mh8qcYFaXEeetAEgIgiYzSPLhe\r
+       WPS+YhQHekWYdxpIFQ8w8uG6XwENZgIaHO8CNrgkESEl1cC4TcxN+GjttWM5k+epPBZh2bvj\r
+       Qu2cBemnciM6OjRbjr3kObYrXO7BnFkyuUt0f67jSy69y1Z3Z9O72/4nckMZbRkTvUTvuz4s\r
+       +VCmYBLwUvN4i6/hIhHrmA3SIfeFedU8pXYZTv26P/vZmulTO3bOqXjVsWZh9ifnhR8/Hd50\r
+       oajc9tvymc7eSizFGYmGWsxFxYkAiBSylLkCAAA=\r
+X-BeenThere: notmuch@notmuchmail.org\r
+X-Mailman-Version: 2.1.13\r
+Precedence: list\r
+List-Id: "Use and development of the notmuch mail system."\r
+       <notmuch.notmuchmail.org>\r
+List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
+       <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
+List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
+List-Post: <mailto:notmuch@notmuchmail.org>\r
+List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
+List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
+       <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
+X-List-Received-Date: Tue, 20 Nov 2012 15:58:54 -0000\r
+\r
+Previously, this would simply indicate that the grep failed without\r
+any indication of the Emacs output it failed on.  Now we take\r
+advantage of the test framework's handling of stdout to display the\r
+incorrect Emacs output if the test fails.\r
+---\r
+\r
+Besides being a good idea in general, this is the first step toward\r
+fixing this test on the Notmuch buildbot, since right now there's no\r
+indication of why it's failing.\r
+\r
+ test/emacs |    5 +++--\r
+ 1 file changed, 3 insertions(+), 2 deletions(-)\r
+\r
+diff --git a/test/emacs b/test/emacs\r
+index 77265b0..5649d55 100755\r
+--- a/test/emacs\r
++++ b/test/emacs\r
+@@ -809,9 +809,10 @@ test_emacs "(let ((mm-text-html-renderer\r
+             (notmuch-show \"id:${gen_msg_id}\"))\r
+           (test-output)" > /dev/null\r
+ # Different Emacs versions and renderers give very different results,\r
+-# so just check that something reasonable showed up.\r
++# so just check that something reasonable showed up.  We first cat the\r
++# output so the test framework will print it if the test fails.\r
+ test_expect_success "Rendering HTML mail with images" \\r
+-    'grep -q smiley OUTPUT'\r
++    'cat OUTPUT && grep -q smiley OUTPUT'\r
\r
\r
+ test_done\r
+-- \r
+1.7.10.4\r
+\r