Re: [PATCH v4 09/16] index encrypted parts when asked.
[notmuch-archives.git] / 5e / 88c2043e520e85bf0594b53eed51ab8d47739b
1 Return-Path: <schnouki@schnouki.net>\r
2 X-Original-To: notmuch@notmuchmail.org\r
3 Delivered-To: notmuch@notmuchmail.org\r
4 Received: from localhost (localhost [127.0.0.1])\r
5         by olra.theworths.org (Postfix) with ESMTP id C0870421164\r
6         for <notmuch@notmuchmail.org>; Wed, 16 Nov 2011 06:34:50 -0800 (PST)\r
7 X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
8 X-Spam-Flag: NO\r
9 X-Spam-Score: -0.1\r
10 X-Spam-Level: \r
11 X-Spam-Status: No, score=-0.1 tagged_above=-999 required=5\r
12         tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1]\r
13         autolearn=disabled\r
14 Received: from olra.theworths.org ([127.0.0.1])\r
15         by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)\r
16         with ESMTP id 33fZEhivAFAZ for <notmuch@notmuchmail.org>;\r
17         Wed, 16 Nov 2011 06:34:49 -0800 (PST)\r
18 Received: from ks3536.kimsufi.com (schnouki.net [87.98.217.222])\r
19         by olra.theworths.org (Postfix) with ESMTP id 905D5429E56\r
20         for <notmuch@notmuchmail.org>; Wed, 16 Nov 2011 06:34:25 -0800 (PST)\r
21 Received: from thor.loria.fr (thor.loria.fr [152.81.12.250])\r
22         by ks3536.kimsufi.com (Postfix) with ESMTPSA id 83A036A002A;\r
23         Wed, 16 Nov 2011 15:34:24 +0100 (CET)\r
24 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=schnouki.net;\r
25         s=key-schnouki; t=1321454064;\r
26         bh=mChOB6pQ+roC9BfCnokNRE+0lPvDfqcd0E8WsvL7ZxQ=;\r
27         h=From:To:Subject:Date:Message-Id:In-Reply-To:References;\r
28         b=ZS2Be98rg/MbHgSqb22yL5Z2ZaYMwap12WZ7SvTO9v1g/RfpcTX6GfVHf7LhD3UJj\r
29         od50idRZmQICb5bE29egF77LL2Ntyo0od8qmI12p5ZDfW7BUEcWMfZX3kRRHF6DJwY\r
30         3Lc3GngrbTlJp7VxMbaNiN0CvAQWcLszVNBTGy/E=\r
31 From: Thomas Jost <schnouki@schnouki.net>\r
32 To: notmuch@notmuchmail.org\r
33 Subject: [PATCH 2/6] test: check if emacs and dtach are available in\r
34         test_emacs()\r
35 Date: Wed, 16 Nov 2011 15:33:51 +0100\r
36 Message-Id: <1321454035-22023-3-git-send-email-schnouki@schnouki.net>\r
37 X-Mailer: git-send-email 1.7.7.3\r
38 In-Reply-To: <1321454035-22023-1-git-send-email-schnouki@schnouki.net>\r
39 References: <1320176954-4897-1-git-send-email-pieter@praet.org>\r
40         <1321454035-22023-1-git-send-email-schnouki@schnouki.net>\r
41 X-BeenThere: notmuch@notmuchmail.org\r
42 X-Mailman-Version: 2.1.13\r
43 Precedence: list\r
44 List-Id: "Use and development of the notmuch mail system."\r
45         <notmuch.notmuchmail.org>\r
46 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
47         <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
48 List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
49 List-Post: <mailto:notmuch@notmuchmail.org>\r
50 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
51 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
52         <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
53 X-List-Received-Date: Wed, 16 Nov 2011 14:34:51 -0000\r
54 \r
55 The test_emacs() function is run by the emacs tests even if the EMACS prereq is\r
56 not available. This causes an issue when running the test suite on a system\r
57 where dtach is not installed: the emacs server will not start, but since the\r
58 $EMACS_SERVER variable is set on the first call to test_emacs, subsequent calls\r
59 may result in attempts to run emacsclient, which will then report "can't find\r
60 socket".\r
61 \r
62 This patch fixes this issue by making sure that dtach and emacs are available\r
63 before doing anything else in test_emacs().\r
64 ---\r
65  test/test-lib.sh |    4 ++++\r
66  1 files changed, 4 insertions(+), 0 deletions(-)\r
67 \r
68 diff --git a/test/test-lib.sh b/test/test-lib.sh\r
69 index 382934f..ca1f412 100755\r
70 --- a/test/test-lib.sh\r
71 +++ b/test/test-lib.sh\r
72 @@ -852,6 +852,10 @@ EOF\r
73  }\r
74  \r
75  test_emacs () {\r
76 +       # First check that emacs and dtach are available\r
77 +       hash emacs &>/dev/null || return\r
78 +       hash dtach &>/dev/null || return\r
79 +\r
80         if [ -z "$EMACS_SERVER" ]; then\r
81                 EMACS_SERVER="notmuch-test-suite-$$"\r
82                 # start a detached session with an emacs server\r
83 -- \r
84 1.7.7.3\r
85 \r