Re: [PATCH 10/10] test: use emacsclient(1) for Emacs tests

Subject: Re: [PATCH 10/10] test: use emacsclient(1) for Emacs tests

Date: Mon, 23 Jan 2012 20:08:59 +0100

To: Dmitry Kurochkin, notmuch@notmuchmail.org

Cc:

From: Xavier Maillard


On Tue, 28 Jun 2011 08:45:11 +0400, Dmitry Kurochkin <dmitry.kurochkin@gmail.com> wrote:
> Before the change, every Emacs test ran in a separate Emacs
> instance.  Starting Emacs many times wastes considerable time and
> it gets worse as the test suite grows.  The patch solves this by
> using a single Emacs server and emacsclient(1) to run multiple
> tests.  Emacs server is started on the first test_emacs call and
> stopped when test_done is called.  We take care not to leave
> orphan Emacs processes behind when test is terminated by whatever
> reason: Emacs server runs a watchdog that periodically checks
> that the test is still running.
> 
> Some tests need to provide user input.  Before the change, this
> was done using echo(1) to Emacs stdin.  This no longer works and
> instead `standard-input' variable is set accordingly to make
> `read' return the appropriate string.

I really like this too. 

+1

/Xavier

Thread: