Re: [PATCH V3 1/1] test/test-lib.sh: use vt100 as dtach terminal if TERM dumb or...
authorJani Nikula <jani@nikula.org>
Thu, 24 Jan 2013 08:01:19 +0000 (09:01 +0100)
committerW. Trevor King <wking@tremily.us>
Fri, 7 Nov 2014 17:53:20 +0000 (09:53 -0800)
e8/8f17b1aec0f7862ea1e61d7ecb8eaee5cac9e5 [new file with mode: 0644]

diff --git a/e8/8f17b1aec0f7862ea1e61d7ecb8eaee5cac9e5 b/e8/8f17b1aec0f7862ea1e61d7ecb8eaee5cac9e5
new file mode 100644 (file)
index 0000000..8091a83
--- /dev/null
@@ -0,0 +1,130 @@
+Return-Path: <jani@nikula.org>\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 144B5431FAF\r
+       for <notmuch@notmuchmail.org>; Thu, 24 Jan 2013 00:01:33 -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 MtqO0brGzmbM for <notmuch@notmuchmail.org>;\r
+       Thu, 24 Jan 2013 00:01:30 -0800 (PST)\r
+Received: from mail-bk0-f46.google.com (mail-bk0-f46.google.com\r
+       [209.85.214.46]) (using TLSv1 with cipher RC4-SHA (128/128 bits))\r
+       (No client certificate requested)\r
+       by olra.theworths.org (Postfix) with ESMTPS id 964E1431FAE\r
+       for <notmuch@notmuchmail.org>; Thu, 24 Jan 2013 00:01:30 -0800 (PST)\r
+Received: by mail-bk0-f46.google.com with SMTP id q16so5009331bkw.33\r
+       for <notmuch@notmuchmail.org>; Thu, 24 Jan 2013 00:01:29 -0800 (PST)\r
+X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;\r
+       d=google.com; s=20120113;\r
+       h=x-received:from:to:cc:subject:in-reply-to:references:user-agent\r
+       :date:message-id:mime-version:content-type:x-gm-message-state;\r
+       bh=EqwnQFvzLDurulgknS6SWGxRVKt/JN4fZksim2NQDHc=;\r
+       b=OEaLfI/4pHUEf75wQmOR9jlSwQpf3jtfSNKItCkJRbBABiuIOIxKih740H8ZySNA4c\r
+       kM0Ugldge0/AdoELqjZEMjzNAnVO00S3LufK4/qLHrV7pS1Z7P9+16frTi+QHJBfJR+K\r
+       qZSoJjzMuA74vBkrlB26y0c5sR84JGodaIjUK/LsafRmGxpmtGwuTvIbSmV6ztK18JhV\r
+       vPuXWiRARwFlO8MWB5tCX+3wsK24T8kJoIaui8q+y50PGJSiGI5EEJk8WtquaCMGvRSm\r
+       cbhG+3ajcgROFrb/nDPZygL5HVLz3S2LOV/UKagCTNKLIN/lrJgIThkeMcMEQt++4rDX\r
+       Z+gA==\r
+X-Received: by 10.204.145.217 with SMTP id e25mr473578bkv.123.1359014487574;\r
+       Thu, 24 Jan 2013 00:01:27 -0800 (PST)\r
+Received: from localhost ([2001:4b98:dc0:43:216:3eff:fe1b:25f3])\r
+       by mx.google.com with ESMTPS id c10sm15920340bkw.1.2013.01.24.00.01.25\r
+       (version=TLSv1.1 cipher=RC4-SHA bits=128/128);\r
+       Thu, 24 Jan 2013 00:01:26 -0800 (PST)\r
+From: Jani Nikula <jani@nikula.org>\r
+To: Tomi Ollila <tomi.ollila@iki.fi>, notmuch@notmuchmail.org\r
+Subject: Re: [PATCH V3 1/1] test/test-lib.sh: use vt100 as dtach terminal if\r
+       TERM dumb or unset/empty\r
+In-Reply-To: <1359013142-3329-1-git-send-email-tomi.ollila@iki.fi>\r
+References: <1359011360-15591-1-git-send-email-tomi.ollila@iki.fi>\r
+       <1359013142-3329-1-git-send-email-tomi.ollila@iki.fi>\r
+User-Agent: Notmuch/0.14+259~gdee88db (http://notmuchmail.org) Emacs/23.2.1\r
+       (x86_64-pc-linux-gnu)\r
+Date: Thu, 24 Jan 2013 09:01:19 +0100\r
+Message-ID: <87zjzzj9gw.fsf@nikula.org>\r
+MIME-Version: 1.0\r
+Content-Type: text/plain; charset=us-ascii\r
+X-Gm-Message-State:\r
+ ALoCoQlIjcrJi5FTKUz3o+UpUTAmbcL2w9R9UMzSAYcRGAEJo+uqt5UNRQgwH40DPiG2BDYP7rSW\r
+Cc: tomi.ollila@iki.fi\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, 24 Jan 2013 08:01:33 -0000\r
+\r
+\r
+LGTM.\r
+\r
+On Thu, 24 Jan 2013, Tomi Ollila <tomi.ollila@iki.fi> wrote:\r
+> The TERM environment variable is set to 'dumb' when running tests, but\r
+> the original value of it is stored for echoing colors and running emacs\r
+> (somewhat interactively) in detached session. Emacs requires some\r
+> terminal control sequences to be available for interactive operation.\r
+> In case original TERM is (also) 'dumb' (or unset/empty) emacs cannot\r
+> run interactively. To fix this problem dtach (and emacs as it's child\r
+> process) is run with TERM=vt100 in case original TERM was unset, empty\r
+> or 'dumb'. This way there is a chance to run emacs tests with different\r
+> user terminals and potentially find problems there.\r
+> ---\r
+>\r
+> Obsoletes id:1359011360-15591-1-git-send-email-tomi.ollila@iki.fi\r
+>\r
+> To be accurate (instead of potentially confusing), the commit\r
+> message and comments have been edited to mention 'unset or empty'\r
+> instead of 'nonexistent'. No functional changes (to neither v1 or v2\r
+> of this patch).\r
+>\r
+>  test/test-lib.sh | 9 +++++++--\r
+>  1 file changed, 7 insertions(+), 2 deletions(-)\r
+>\r
+> diff --git a/test/test-lib.sh b/test/test-lib.sh\r
+> index 6ce3b31..1567178 100644\r
+> --- a/test/test-lib.sh\r
+> +++ b/test/test-lib.sh\r
+> @@ -41,6 +41,10 @@ esac\r
+>  # Keep the original TERM for say_color and test_emacs\r
+>  ORIGINAL_TERM=$TERM\r
+>  \r
+> +# dtach(1) provides more capable terminal environment to anything\r
+> +# that requires more than dumb terminal...\r
+> +[ x"${TERM:-dumb}" = xdumb ] && DTACH_TERM=vt100 || DTACH_TERM=$TERM\r
+> +\r
+>  # For repeatability, reset the environment to known value.\r
+>  LANG=C\r
+>  LC_ALL=C\r
+> @@ -996,9 +1000,10 @@ test_emacs () {\r
+>              fi\r
+>              server_name="notmuch-test-suite-$$"\r
+>              # start a detached session with an emacs server\r
+> -            # user's TERM is given to dtach which assumes a minimally\r
+> +            # user's TERM (or 'vt100' in case user's TERM is unset, empty\r
+> +            # or 'dumb') is given to dtach which assumes a minimally\r
+>              # VT100-compatible terminal -- and emacs inherits that\r
+> -            TERM=$ORIGINAL_TERM dtach -n "$TEST_TMPDIR/emacs-dtach-socket.$$" \\r
+> +            TERM=$DTACH_TERM dtach -n "$TEST_TMPDIR/emacs-dtach-socket.$$" \\r
+>                      sh -c "stty rows 24 cols 80; exec '$TMP_DIRECTORY/run_emacs' \\r
+>                              --no-window-system \\r
+>                              $load_emacs_tests \\r
+> -- \r
+> 1.8.0\r
+>\r
+> _______________________________________________\r
+> notmuch mailing list\r
+> notmuch@notmuchmail.org\r
+> http://notmuchmail.org/mailman/listinfo/notmuch\r