[PATCH 8/9] test: check if emacs is available in the beginning of test_emacs
Tomi Ollila
tomi.ollila at iki.fi
Thu Nov 17 01:43:36 PST 2011
On Thu, 17 Nov 2011 05:56:25 +0400, Dmitry Kurochkin <dmitry.kurochkin at gmail.com> wrote:
> Unfortunately, this is needed to avoid the emacs waiting loop.
> ---
> test/test-lib.sh | 4 ++++
> 1 files changed, 4 insertions(+), 0 deletions(-)
[ context reduced ]
> diff --git a/test/test-lib.sh b/test/test-lib.sh
> index 840c86c..5bd5bd6 100755
> --- a/test/test-lib.sh
> +++ b/test/test-lib.sh
I have to patch the full set to my clone of the repo and do
fuller review, but until that...
> test_emacs () {
> + # test dependencies beforehand to avoid the waiting loop below
> + which emacs >/dev/null || emacs || return
> + which emacsclient >/dev/null || emacsclient || return
> +
If emacs not found using which (what happened to hash), then try
to execute emacs (??) and if that fails return.
Same thing with emacsclient.
In case of emacs: DISPLAY set, TERM=dumb -- emacs starts interactively
on my desktop; grep DISPLAY test/* yields nothing. (maybe we should unset
DISPLAY for tests ?). And, if DISPLAY unset, emacs exits with nonzero
value, making || return happen anyway.
... and this is tested every time test_emacs() is executed...
> if [ -z "$EMACS_SERVER" ]; then
> server_name="notmuch-test-suite-$$"
> --
> 1.7.7.2
Tomi
More information about the notmuch
mailing list