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

Xavier Maillard xavier at maillard.im
Mon Jan 23 11:08:59 PST 2012


On Tue, 28 Jun 2011 08:45:11 +0400, Dmitry Kurochkin <dmitry.kurochkin at 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


More information about the notmuch mailing list