[PATCH] test: use dtach(1) instead of screen(1) in emacs tests.
Pieter Praet
pieter at praet.org
Thu Nov 10 16:17:37 PST 2011
On Thu, 10 Nov 2011 14:22:17 -0800, Jameson Graef Rollins <jrollins at finestructure.net> wrote:
> From: Tomi Ollila <tomi.ollila at iki.fi>
>
> dtach is lighter than screen and is not setuid/setgid program so
> TMPDIR does not get reset by dynamic loader when executed.
>
`dtach' may be lighter than `screen', but contrary to my expectations,
it appears to be far less efficient:
| | original [1] | w/ screen [2] | w/ dtach [3] |
|------+--------------+---------------+--------------|
| real | 0m17.570s | 0m20.132s | 0m28.567s |
| user | 0m2.453s | 0m2.593s | 0m2.753s |
| sys | 0m1.700s | 0m1.577s | 0m1.753s |
> Signed-off-by: Jameson Graef Rollins <jrollins at finestructure.net>
> ---
> This tweaks the original patch slightly by removing the no-longer needed
> screenrc variables.
>
> test/test-lib.sh | 5 ++---
> 1 files changed, 2 insertions(+), 3 deletions(-)
>
> diff --git a/test/test-lib.sh b/test/test-lib.sh
> index c81c709..c0fe037 100755
> --- a/test/test-lib.sh
> +++ b/test/test-lib.sh
> @@ -50,8 +50,6 @@ TZ=UTC
> TERM=dumb
> export LANG LC_ALL PAGER TERM TZ
> GIT_TEST_CMP=${GIT_TEST_CMP:-diff -u}
> -export SCREENRC=/dev/null
> -export SYSSCREENRC=/dev/null
>
> # Protect ourselves from common misconfiguration to export
> # CDPATH into the environment
> @@ -844,7 +842,8 @@ test_emacs () {
> if [ -z "$EMACS_SERVER" ]; then
> EMACS_SERVER="notmuch-test-suite-$$"
> # start a detached screen session with an emacs server
> - screen -S "$EMACS_SERVER" -d -m "$TMP_DIRECTORY/run_emacs" \
> + TERM=xterm dtach -n "$TMP_DIRECTORY/dtach-emacs-socket-$$" \
It's worth noting that $TERM is only set to "xterm" to deceive `dtach',
so thankfully, xterm (and all its deps) aren't actually required to run
the tests.
> + "$TMP_DIRECTORY/run_emacs" \
> --no-window-system \
> --eval "(setq server-name \"$EMACS_SERVER\")" \
> --eval '(server-start)' \
> --
> 1.7.7.1
>
> _______________________________________________
> notmuch mailing list
> notmuch at notmuchmail.org
> http://notmuchmail.org/mailman/listinfo/notmuch
Peace
--
Pieter
[1] @ commit 749abb74
[2] @ commit 760b311b
[3] @ commit 760b311b + id:"1320963737-1666-1-git-send-email-jrollins at finestructure.net"
More information about the notmuch
mailing list