From ff7397ff6fdb539eb058574530b948a945b44c4b Mon Sep 17 00:00:00 2001 From: Michal Sojka Date: Mon, 28 Dec 2015 22:16:35 +0100 Subject: [PATCH] [PATCH] test: Unset ALTERNATE_EDITOR before running emacsclient --- 3a/8012e99b34207ad90d53086a8778b55d9aaea6 | 82 +++++++++++++++++++++++ 1 file changed, 82 insertions(+) create mode 100644 3a/8012e99b34207ad90d53086a8778b55d9aaea6 diff --git a/3a/8012e99b34207ad90d53086a8778b55d9aaea6 b/3a/8012e99b34207ad90d53086a8778b55d9aaea6 new file mode 100644 index 000000000..8981e4ab0 --- /dev/null +++ b/3a/8012e99b34207ad90d53086a8778b55d9aaea6 @@ -0,0 +1,82 @@ +Return-Path: +X-Original-To: notmuch@notmuchmail.org +Delivered-To: notmuch@notmuchmail.org +Received: from localhost (localhost [127.0.0.1]) + by arlo.cworth.org (Postfix) with ESMTP id 818846DE1579 + for ; Mon, 28 Dec 2015 13:17:20 -0800 (PST) +X-Virus-Scanned: Debian amavisd-new at cworth.org +X-Spam-Flag: NO +X-Spam-Score: -1.364 +X-Spam-Level: +X-Spam-Status: No, score=-1.364 tagged_above=-999 required=5 tests=[AWL=1.486, + RCVD_IN_DNSWL_MED=-2.3, RP_MATCHES_RCVD=-0.55] autolearn=disabled +Received: from arlo.cworth.org ([127.0.0.1]) + by localhost (arlo.cworth.org [127.0.0.1]) (amavisd-new, port 10024) + with ESMTP id m_YUiT0v6IxX for ; + Mon, 28 Dec 2015 13:17:17 -0800 (PST) +Received: from max.feld.cvut.cz (max.feld.cvut.cz [147.32.192.36]) + by arlo.cworth.org (Postfix) with ESMTP id 57FDE6DE111A + for ; Mon, 28 Dec 2015 13:17:17 -0800 (PST) +Received: from localhost (unknown [192.168.200.7]) + by max.feld.cvut.cz (Postfix) with ESMTP id 912E419F38E4 + for ; Mon, 28 Dec 2015 22:17:15 +0100 (CET) +X-Virus-Scanned: IMAP STYX AMAVIS +Received: from max.feld.cvut.cz ([192.168.200.1]) + by localhost (styx.feld.cvut.cz [192.168.200.7]) (amavisd-new, port 10044) + with ESMTP id fM4AKUgH-kuV for ; + Mon, 28 Dec 2015 22:17:14 +0100 (CET) +Received: from imap.feld.cvut.cz (imap.feld.cvut.cz [147.32.192.34]) + by max.feld.cvut.cz (Postfix) with ESMTP id 24C6F19F3893 + for ; Mon, 28 Dec 2015 22:17:13 +0100 (CET) +Received: from wsh by steelpick.2x.cz with local (Exim 4.86) + (envelope-from ) + id 1aDfAF-0003hl-P3; Mon, 28 Dec 2015 22:17:11 +0100 +From: Michal Sojka +To: notmuch@notmuchmail.org +Subject: [PATCH] test: Unset ALTERNATE_EDITOR before running emacsclient +Date: Mon, 28 Dec 2015 22:16:35 +0100 +Message-Id: <1451337395-14196-1-git-send-email-sojkam1@fel.cvut.cz> +X-Mailer: git-send-email 2.6.4 +X-BeenThere: notmuch@notmuchmail.org +X-Mailman-Version: 2.1.20 +Precedence: list +List-Id: "Use and development of the notmuch mail system." + +List-Unsubscribe: , + +List-Archive: +List-Post: +List-Help: +List-Subscribe: , + +X-List-Received-Date: Mon, 28 Dec 2015 21:17:20 -0000 + +ALTERNATE_EDITOR causes emacsclient to run an alternate editor if the +emacs server is not ready. This can collide with intended +functionality in test-lib.sh. + +If the ALTERNATE_EDITOR is set but empty, emacsclient runs emacs +daemon and tries to connect to it. When this happens the emacs run by +test-lib.sh fails to start the server and the subsequent attempts to +use the server fail because the daemon started by emacsclient does not +know about notmuch-test-progn. This leads to test suite failure due to +time out on any emacs test. +--- + test/test-lib.sh | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/test/test-lib.sh b/test/test-lib.sh +index 126911f..0f6a6cf 100644 +--- a/test/test-lib.sh ++++ b/test/test-lib.sh +@@ -1152,6 +1152,7 @@ test_emacs () { + rm -f OUTPUT + touch OUTPUT + ++ unset ALTERNATE_EDITOR + ${TEST_EMACSCLIENT} --socket-name="$EMACS_SERVER" --eval "(notmuch-test-progn $@)" + } + +-- +2.6.4 + -- 2.26.2