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