Re: [PATCH 8/9] test: check if emacs is available in the beginning of test_emacs
authorTomi Ollila <tomi.ollila@iki.fi>
Thu, 17 Nov 2011 09:43:36 +0000 (11:43 +0200)
committerW. Trevor King <wking@tremily.us>
Fri, 7 Nov 2014 17:40:16 +0000 (09:40 -0800)
b2/6d6a64583881b39044948b77a59e315747ed14 [new file with mode: 0644]

diff --git a/b2/6d6a64583881b39044948b77a59e315747ed14 b/b2/6d6a64583881b39044948b77a59e315747ed14
new file mode 100644 (file)
index 0000000..6864ba5
--- /dev/null
@@ -0,0 +1,95 @@
+Return-Path: <tomi.ollila@nixu.com>\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 8626B429E21\r
+       for <notmuch@notmuchmail.org>; Thu, 17 Nov 2011 01:43:43 -0800 (PST)\r
+X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
+X-Spam-Flag: NO\r
+X-Spam-Score: 0\r
+X-Spam-Level: \r
+X-Spam-Status: No, score=0 tagged_above=-999 required=5 tests=[none]\r
+       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 p0VAmz9VGSQ4 for <notmuch@notmuchmail.org>;\r
+       Thu, 17 Nov 2011 01:43:41 -0800 (PST)\r
+Received: from taco2.nixu.fi (taco2.nixu.fi [194.197.118.31])\r
+       (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits))\r
+       (No client certificate requested)\r
+       by olra.theworths.org (Postfix) with ESMTPS id E685A431FD0\r
+       for <notmuch@notmuchmail.org>; Thu, 17 Nov 2011 01:43:40 -0800 (PST)\r
+Received: from taco2.nixu.fi (taco2.nixu.fi [194.197.118.31])\r
+       by taco2.nixu.fi (8.14.3/8.14.3/Debian-5+lenny1) with ESMTP id\r
+       pAH9ha5w008495; Thu, 17 Nov 2011 11:43:37 +0200\r
+From: Tomi Ollila <tomi.ollila@iki.fi>\r
+To: Dmitry Kurochkin <dmitry.kurochkin@gmail.com>, notmuch@notmuchmail.org\r
+Subject: Re: [PATCH 8/9] test: check if emacs is available in the beginning of\r
+       test_emacs\r
+In-Reply-To: <1321494986-18998-9-git-send-email-dmitry.kurochkin@gmail.com>\r
+References: <1321494986-18998-1-git-send-email-dmitry.kurochkin@gmail.com>\r
+       <1321494986-18998-9-git-send-email-dmitry.kurochkin@gmail.com>\r
+User-Agent: Notmuch/0.9+73~ged20210 (http://notmuchmail.org) Emacs/23.3.1\r
+       (i686-pc-linux-gnu)\r
+X-Face: HhBM'cA~<r"^Xv\KRN0P{vn'Y"Kd;zg_y3S[4)KSN~s?O\"QPoL\r
+       $[Xv_BD:i/F$WiEWax}R(MPS`^UaptOGD`*/=@\1lKoVa9tnrg0TW?"r7aRtgk[F\r
+       !)g;OY^,BjTbr)Np:%c_o'jj,Z\r
+Date: Thu, 17 Nov 2011 11:43:36 +0200\r
+Message-ID: <yf67h2zgk3b.fsf@taco2.nixu.fi>\r
+MIME-Version: 1.0\r
+Content-Type: text/plain; charset=us-ascii\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: Thu, 17 Nov 2011 09:43:43 -0000\r
+\r
+On Thu, 17 Nov 2011 05:56:25 +0400, Dmitry Kurochkin <dmitry.kurochkin@gmail.com> wrote:\r
+> Unfortunately, this is needed to avoid the emacs waiting loop.\r
+> ---\r
+\r
+>  test/test-lib.sh |    4 ++++\r
+>  1 files changed, 4 insertions(+), 0 deletions(-)\r
+\r
+[ context reduced ]\r
+\r
+> diff --git a/test/test-lib.sh b/test/test-lib.sh\r
+> index 840c86c..5bd5bd6 100755\r
+> --- a/test/test-lib.sh\r
+> +++ b/test/test-lib.sh\r
+\r
+I have to patch the full set to my clone of the repo and do \r
+fuller review, but until that...\r
+\r
+>  test_emacs () {\r
+> +    # test dependencies beforehand to avoid the waiting loop below\r
+> +    which emacs >/dev/null || emacs || return\r
+> +    which emacsclient >/dev/null || emacsclient || return\r
+> +\r
+\r
+If emacs not found using which (what happened to hash), then try\r
+to execute emacs (??) and if that fails return.\r
+\r
+Same thing with emacsclient.\r
+\r
+In case of emacs: DISPLAY set, TERM=dumb -- emacs starts interactively\r
+on my desktop; grep DISPLAY test/* yields nothing. (maybe we should unset\r
+DISPLAY for tests ?). And, if DISPLAY unset, emacs exits with nonzero\r
+value, making || return happen anyway.\r
+\r
+... and this is tested every time test_emacs() is executed...\r
+\r
+>      if [ -z "$EMACS_SERVER" ]; then\r
+>              server_name="notmuch-test-suite-$$"\r
+> -- \r
+> 1.7.7.2\r
+\r
+Tomi\r