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

2011-06-29 Thread Dmitry Kurochkin
On Tue, 28 Jun 2011 13:10:58 -0700, Carl Worth wrote: Non-text part: multipart/signed > On Tue, 28 Jun 2011 20:42:42 +0400, Dmitry Kurochkin gmail.com> wrote: > > I would like to hear what other (Carl in particular) think about this. > > If the consensus is for your approach, I would be happy to

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

2011-06-29 Thread Dmitry Kurochkin
On Tue, 28 Jun 2011 13:10:58 -0700, Carl Worth wrote: > On Tue, 28 Jun 2011 20:42:42 +0400, Dmitry Kurochkin gmail.com> wrote: > > I would like to hear what other (Carl in particular) think about this. > > If the consensus is for your approach, I would be happy to implement > > it. > > In genera

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

2011-06-28 Thread Dmitry Kurochkin
On Tue, 28 Jun 2011 12:22:57 -0400, Austin Clements wrote: > Quoth myself on Jun 27 at 11:49 pm: > > Quoth Dmitry Kurochkin on Jun 28 at 5:03 am: > > EMACSDONE=$TEST_DIRECTORY/emacsdone > > mkfifo $EMACSDONE > > coproc emacs --batch --eval '(while t (eval (read)) (write-region "\n" nil > > "'$EM

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

2011-06-28 Thread Carl Worth
On Wed, 29 Jun 2011 00:58:41 +0400, Dmitry Kurochkin wrote: > BTW Carl, while we continue our debate, you may consider applying the > first 9 patches from the series :) Yes, I already did that. And I would have even installed all 10 (with the debate still going) except that I'm seeing tests fai

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

2011-06-28 Thread Carl Worth
On Wed, 29 Jun 2011 00:58:41 +0400, Dmitry Kurochkin wrote: > BTW Carl, while we continue our debate, you may consider applying the > first 9 patches from the series :) Yes, I already did that. And I would have even installed all 10 (with the debate still going) except that I'm seeing tests fail

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

2011-06-28 Thread Carl Worth
On Wed, 29 Jun 2011 00:47:37 +0400, Dmitry Kurochkin wrote: > > "more robust against leaving daemon's around for some reason", etc. > > Not sure I agree with this. I'm sorry. I wasn't clear. I wasn't advocating one solution over the other. I was just giving an example of the kind of technical

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

2011-06-28 Thread Carl Worth
On Wed, 29 Jun 2011 00:47:37 +0400, Dmitry Kurochkin wrote: > > "more robust against leaving daemon's around for some reason", etc. > > Not sure I agree with this. I'm sorry. I wasn't clear. I wasn't advocating one solution over the other. I was just giving an example of the kind of technical m

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

2011-06-28 Thread Dmitry Kurochkin
On Tue, 28 Jun 2011 13:10:58 -0700, Carl Worth wrote: Non-text part: multipart/signed > On Tue, 28 Jun 2011 20:42:42 +0400, Dmitry Kurochkin > wrote: > > I would like to hear what other (Carl in particular) think about this. > > If the consensus is for your approach, I would be happy to implemen

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

2011-06-28 Thread Dmitry Kurochkin
On Tue, 28 Jun 2011 13:10:58 -0700, Carl Worth wrote: > On Tue, 28 Jun 2011 20:42:42 +0400, Dmitry Kurochkin > wrote: > > I would like to hear what other (Carl in particular) think about this. > > If the consensus is for your approach, I would be happy to implement > > it. > > In general, I lov

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

2011-06-28 Thread Carl Worth
On Tue, 28 Jun 2011 20:42:42 +0400, Dmitry Kurochkin wrote: > I would like to hear what other (Carl in particular) think about this. > If the consensus is for your approach, I would be happy to implement > it. In general, I love the whole series, thanks! I'm looking forward to our future, faster

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

2011-06-28 Thread Carl Worth
On Tue, 28 Jun 2011 20:42:42 +0400, Dmitry Kurochkin wrote: > I would like to hear what other (Carl in particular) think about this. > If the consensus is for your approach, I would be happy to implement > it. In general, I love the whole series, thanks! I'm looking forward to our future, faster

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

2011-06-28 Thread Austin Clements
Quoth myself on Jun 27 at 11:49 pm: > Quoth Dmitry Kurochkin on Jun 28 at 5:03 am: > EMACSDONE=$TEST_DIRECTORY/emacsdone > mkfifo $EMACSDONE > coproc emacs --batch --eval '(while t (eval (read)) (write-region "\n" nil > "'$EMACSDONE'" t 0))' > EMACSFD=${COPROC[1]} > > test_emacs() { > echo "

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

2011-06-28 Thread Dmitry Kurochkin
On Tue, 28 Jun 2011 12:22:57 -0400, Austin Clements wrote: > Quoth myself on Jun 27 at 11:49 pm: > > Quoth Dmitry Kurochkin on Jun 28 at 5:03 am: > > EMACSDONE=$TEST_DIRECTORY/emacsdone > > mkfifo $EMACSDONE > > coproc emacs --batch --eval '(while t (eval (read)) (write-region "\n" nil > > "'$EM

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

2011-06-28 Thread Austin Clements
Quoth myself on Jun 27 at 11:49 pm: > Quoth Dmitry Kurochkin on Jun 28 at 5:03 am: > EMACSDONE=$TEST_DIRECTORY/emacsdone > mkfifo $EMACSDONE > coproc emacs --batch --eval '(while t (eval (read)) (write-region "\n" nil > "'$EMACSDONE'" t 0))' > EMACSFD=${COPROC[1]} > > test_emacs() { > echo "

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

2011-06-28 Thread Dmitry Kurochkin
On Tue, 28 Jun 2011 00:17:42 -0400, Austin Clements wrote: > Quoth Dmitry Kurochkin on Jun 28 at 7:59 am: > > I am sure that would work, but I do not like the complexity. How about > > getting back to standard emacsclient and running a watchdog in the > > emacs? Like: > > > > (defun orphan-wat

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

2011-06-28 Thread Dmitry Kurochkin
On Mon, 27 Jun 2011 23:49:37 -0400, Austin Clements wrote: > Quoth Dmitry Kurochkin on Jun 28 at 5:03 am: > > > > The only way I know to > > > > reliably kill a child process is to open a pipe to it and have it exit > > > > on its own when it reads EOF. Unfortunately, I couldn't find a way to >

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

2011-06-28 Thread Dmitry Kurochkin
Austin, On Tue, 28 Jun 2011 00:22:41 +0400, Dmitry Kurochkin wrote: > On Mon, 27 Jun 2011 16:02:12 -0400, Austin Clements > wrote: > > This looks like a great idea! The test suite has been getting irritating > > slow. > > > > A few minor comments: This patch would be clearer if it the > > se

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

2011-06-28 Thread Dmitry Kurochkin
On Mon, 27 Jun 2011 16:02:12 -0400, Austin Clements wrote: > This looks like a great idea! The test suite has been getting irritating > slow. > > A few minor comments: This patch would be clearer if it the > setq-to-let translation were a separate patch. It would also be worth > adding a big c

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

2011-06-28 Thread Austin Clements
Quoth Dmitry Kurochkin on Jun 28 at 7:59 am: > I am sure that would work, but I do not like the complexity. How about > getting back to standard emacsclient and running a watchdog in the > emacs? Like: > > (defun orphan-watchdog (pid) > "Periodically check that the process with id PID is stil

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

2011-06-27 Thread Austin Clements
Quoth Dmitry Kurochkin on Jun 28 at 5:03 am: > > > The only way I know to > > > reliably kill a child process is to open a pipe to it and have it exit > > > on its own when it reads EOF. Unfortunately, I couldn't find a way to > > > do this with an emacs daemon (it appears daemon mode aggressive

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

2011-06-27 Thread Dmitry Kurochkin
On Tue, 28 Jun 2011 00:17:42 -0400, Austin Clements wrote: > Quoth Dmitry Kurochkin on Jun 28 at 7:59 am: > > I am sure that would work, but I do not like the complexity. How about > > getting back to standard emacsclient and running a watchdog in the > > emacs? Like: > > > > (defun orphan-wat

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

2011-06-27 Thread Austin Clements
Quoth Dmitry Kurochkin on Jun 28 at 7:59 am: > I am sure that would work, but I do not like the complexity. How about > getting back to standard emacsclient and running a watchdog in the > emacs? Like: > > (defun orphan-watchdog (pid) > "Periodically check that the process with id PID is stil

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

2011-06-27 Thread Dmitry Kurochkin
On Mon, 27 Jun 2011 23:49:37 -0400, Austin Clements wrote: > Quoth Dmitry Kurochkin on Jun 28 at 5:03 am: > > > > The only way I know to > > > > reliably kill a child process is to open a pipe to it and have it exit > > > > on its own when it reads EOF. Unfortunately, I couldn't find a way to >

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

2011-06-27 Thread Austin Clements
Quoth Dmitry Kurochkin on Jun 28 at 5:03 am: > > > The only way I know to > > > reliably kill a child process is to open a pipe to it and have it exit > > > on its own when it reads EOF. Unfortunately, I couldn't find a way to > > > do this with an emacs daemon (it appears daemon mode aggressive

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

2011-06-27 Thread Dmitry Kurochkin
Austin, On Tue, 28 Jun 2011 00:22:41 +0400, Dmitry Kurochkin wrote: > On Mon, 27 Jun 2011 16:02:12 -0400, Austin Clements wrote: > > This looks like a great idea! The test suite has been getting irritating > > slow. > > > > A few minor comments: This patch would be clearer if it the > > setq

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

2011-06-27 Thread Austin Clements
On Mon, Jun 27, 2011 at 4:22 PM, Dmitry Kurochkin wrote: > On Mon, 27 Jun 2011 16:02:12 -0400, Austin Clements > wrote: >> ?The trap is there just to cleanly shut down in case of a normal >> exit [1]. > > For normal exit we should just put this into test_done. ?Otherwise it is > not a normal exi

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

2011-06-27 Thread Austin Clements
This looks like a great idea! The test suite has been getting irritating slow. A few minor comments: This patch would be clearer if it the setq-to-let translation were a separate patch. It would also be worth adding a big comment at the top of the test explaining why all of the tests let-bind ev

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

2011-06-27 Thread Austin Clements
On Mon, Jun 27, 2011 at 4:22 PM, Dmitry Kurochkin wrote: > On Mon, 27 Jun 2011 16:02:12 -0400, Austin Clements wrote: >>  The trap is there just to cleanly shut down in case of a normal >> exit [1]. > > For normal exit we should just put this into test_done.  Otherwise it is > not a normal exit a

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

2011-06-27 Thread Dmitry Kurochkin
On Mon, 27 Jun 2011 16:02:12 -0400, Austin Clements wrote: > This looks like a great idea! The test suite has been getting irritating > slow. > > A few minor comments: This patch would be clearer if it the > setq-to-let translation were a separate patch. It would also be worth > adding a big c

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

2011-06-27 Thread Austin Clements
This looks like a great idea! The test suite has been getting irritating slow. A few minor comments: This patch would be clearer if it the setq-to-let translation were a separate patch. It would also be worth adding a big comment at the top of the test explaining why all of the tests let-bind ev

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

2011-06-27 Thread Dmitry Kurochkin
Before the change, every Emacs tests 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

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

2011-06-26 Thread Dmitry Kurochkin
Before the change, every Emacs tests 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