unofficial mirror of notmuch@notmuchmail.org
 help / color / mirror / code / Atom feed
* [PATCH] test: do not hide test_emacs errors
@ 2011-07-01  2:23 Dmitry Kurochkin
  2011-11-12 14:57 ` David Bremner
  0 siblings, 1 reply; 5+ messages in thread
From: Dmitry Kurochkin @ 2011-07-01  2:23 UTC (permalink / raw)
  To: notmuch

Do not redirect test_emacs stderr to /dev/null.  Test_emacs uses
emacsclient(1) now and it does not print unwanted messages (like
those from `message') to stderr.  But it does print useful
errors, e.g. when emacs server connection fails, given expression
is not valid or undefined function is called.
---
 test/emacs       |    4 ++--
 test/test-lib.sh |    2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/test/emacs b/test/emacs
index 53f455a..dbe8d9e 100755
--- a/test/emacs
+++ b/test/emacs
@@ -261,13 +261,13 @@ test_begin_subtest "Save attachment from within emacs using notmuch-show-save-at
 # save as archive to test that Emacs does not re-compress .gz
 test_emacs '(let ((standard-input "\"attachment1.gz\""))
 	      (notmuch-show "id:cf0c4d610911171136h1713aa59w9cf9aa31f052ad0a@mail.gmail.com")
-	      (notmuch-show-save-attachments))' > /dev/null 2>&1
+	      (notmuch-show-save-attachments))'
 test_expect_equal_file attachment1.gz "$EXPECTED/attachment"
 
 test_begin_subtest "Save attachment from within emacs using notmuch-show-save-part"
 # save as archive to test that Emacs does not re-compress .gz
 test_emacs '(let ((standard-input "\"attachment2.gz\""))
-	      (notmuch-show-save-part "id:cf0c4d610911171136h1713aa59w9cf9aa31f052ad0a@mail.gmail.com" 5))' > /dev/null 2>&1
+	      (notmuch-show-save-part "id:cf0c4d610911171136h1713aa59w9cf9aa31f052ad0a@mail.gmail.com" 5))'
 test_expect_equal_file attachment2.gz "$EXPECTED/attachment"
 
 test_begin_subtest "View raw message within emacs"
diff --git a/test/test-lib.sh b/test/test-lib.sh
index 22e387e..37f007a 100755
--- a/test/test-lib.sh
+++ b/test/test-lib.sh
@@ -394,7 +394,7 @@ emacs_deliver_message ()
 	   (message-goto-body)
 	   (insert \"${body}\")
 	   $@
-	   (message-send-and-exit))" >/dev/null 2>&1
+	   (message-send-and-exit))"
     wait ${smtp_dummy_pid}
     notmuch new >/dev/null
 }
-- 
1.7.5.4

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH] test: do not hide test_emacs errors
  2011-07-01  2:23 [PATCH] test: do not hide test_emacs errors Dmitry Kurochkin
@ 2011-11-12 14:57 ` David Bremner
  2011-11-12 17:49   ` Tomi Ollila
  2011-11-13  7:06   ` Dmitry Kurochkin
  0 siblings, 2 replies; 5+ messages in thread
From: David Bremner @ 2011-11-12 14:57 UTC (permalink / raw)
  To: Dmitry Kurochkin, notmuch

On Fri,  1 Jul 2011 06:23:48 +0400, Dmitry Kurochkin <dmitry.kurochkin@gmail.com> wrote:
> Do not redirect test_emacs stderr to /dev/null.  Test_emacs uses
> emacsclient(1) now and it does not print unwanted messages (like
> those from `message') to stderr.  But it does print useful
> errors, e.g. when emacs server connection fails, given expression
> is not valid or undefined function is called.

Is this patch still relevant now that we use dtach to run the tests?

I didn't notice any difference, but maybe I was not supposed to.

d

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] test: do not hide test_emacs errors
  2011-11-12 14:57 ` David Bremner
@ 2011-11-12 17:49   ` Tomi Ollila
  2011-11-13  7:06   ` Dmitry Kurochkin
  1 sibling, 0 replies; 5+ messages in thread
From: Tomi Ollila @ 2011-11-12 17:49 UTC (permalink / raw)
  To: David Bremner, Dmitry Kurochkin, notmuch

On Sat, 12 Nov 2011 09:57:53 -0500, David Bremner <david@tethera.net> wrote:
> On Fri,  1 Jul 2011 06:23:48 +0400, Dmitry Kurochkin <dmitry.kurochkin@gmail.com> wrote:
> > Do not redirect test_emacs stderr to /dev/null.  Test_emacs uses
> > emacsclient(1) now and it does not print unwanted messages (like
> > those from `message') to stderr.  But it does print useful
> > errors, e.g. when emacs server connection fails, given expression
> > is not valid or undefined function is called.
> 
> Is this patch still relevant now that we use dtach to run the tests?

I think this is. running test_emacs may output useful information in
cases test fails (or when initially failing to launc emacs server).
Normally it doesn't seem to output anything -- and therefore the
redirections to /dev/null are not needed.

> I didn't notice any difference, but maybe I was not supposed to.

Me neither.

> 
> d

Tomi

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] test: do not hide test_emacs errors
  2011-11-12 14:57 ` David Bremner
  2011-11-12 17:49   ` Tomi Ollila
@ 2011-11-13  7:06   ` Dmitry Kurochkin
  2011-11-13 13:56     ` David Bremner
  1 sibling, 1 reply; 5+ messages in thread
From: Dmitry Kurochkin @ 2011-11-13  7:06 UTC (permalink / raw)
  To: David Bremner, notmuch

On Sat, 12 Nov 2011 09:57:53 -0500, David Bremner <david@tethera.net> wrote:
> On Fri,  1 Jul 2011 06:23:48 +0400, Dmitry Kurochkin <dmitry.kurochkin@gmail.com> wrote:
> > Do not redirect test_emacs stderr to /dev/null.  Test_emacs uses
> > emacsclient(1) now and it does not print unwanted messages (like
> > those from `message') to stderr.  But it does print useful
> > errors, e.g. when emacs server connection fails, given expression
> > is not valid or undefined function is called.
> 
> Is this patch still relevant now that we use dtach to run the tests?
> 

It is still relevant.  If test_emacs prints any errors, we should see
them.  If it does not, we should remove the redirection.

But we need to check for other similar cases.  New test cases may have
been added with test_emacs stderr redirect.

> I didn't notice any difference, but maybe I was not supposed to.
> 

I think that is expected.

Regards,
  Dmitry

> d

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] test: do not hide test_emacs errors
  2011-11-13  7:06   ` Dmitry Kurochkin
@ 2011-11-13 13:56     ` David Bremner
  0 siblings, 0 replies; 5+ messages in thread
From: David Bremner @ 2011-11-13 13:56 UTC (permalink / raw)
  To: Dmitry Kurochkin, notmuch

On Sun, 13 Nov 2011 11:06:43 +0400, Dmitry Kurochkin <dmitry.kurochkin@gmail.com> wrote:
> > Is this patch still relevant now that we use dtach to run the tests?
> > 
> 
> It is still relevant.  If test_emacs prints any errors, we should see
> them.  If it does not, we should remove the redirection.

pushed, 

d

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2011-11-13 13:56 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-07-01  2:23 [PATCH] test: do not hide test_emacs errors Dmitry Kurochkin
2011-11-12 14:57 ` David Bremner
2011-11-12 17:49   ` Tomi Ollila
2011-11-13  7:06   ` Dmitry Kurochkin
2011-11-13 13:56     ` David Bremner

Code repositories for project(s) associated with this public inbox

	https://yhetil.org/notmuch.git/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).