unofficial mirror of notmuch@notmuchmail.org
 help / color / mirror / code / Atom feed
* [PATCH] make test: NOTMUCH_TEST_QUIET=1 is now the default
@ 2015-09-11 20:44 Tomi Ollila
  2015-09-20 11:31 ` David Bremner
  2015-09-25 11:51 ` David Bremner
  0 siblings, 2 replies; 5+ messages in thread
From: Tomi Ollila @ 2015-09-11 20:44 UTC (permalink / raw)
  To: notmuch; +Cc: tomi.ollila

make test V=1 (or any other value than 0) and make test V=0
works similar way as build in general
---

This is 2nd try: In first one I changed test-lib.sh -- there problem
was the precedence between command line argument and NOTMUCH_TEST_QUIET
environment variable. Here I don't see a problem there (although
env NOTMUCH_TEST_QUIET=1 make test V=1 will make environment variable
overrule the V=1 -- I am not sure who cares, though :D)

Anyway, Someone(TM) may have better solution in mind, so let's
get bikeshedding going!

 test/Makefile.local | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/test/Makefile.local b/test/Makefile.local
index 2331ceb..2b18691 100644
--- a/test/Makefile.local
+++ b/test/Makefile.local
@@ -56,7 +56,17 @@ TEST_BINARIES := $(TEST_BINARIES:.cc=)
 test-binaries: $(TEST_BINARIES)
 
 test:	all test-binaries
+ifeq ($V,)
+	@echo 'Use "$(MAKE) V=1" to print test headings and PASSIng results.'
+	@env NOTMUCH_TEST_QUIET=1 ${test_src_dir}/notmuch-test $(OPTIONS)
+else
+# The user has explicitly enabled quiet execution.
+ifeq ($V,0)
+	@env NOTMUCH_TEST_QUIET=1 ${test_src_dir}/notmuch-test $(OPTIONS)
+else
 	@${test_src_dir}/notmuch-test $(OPTIONS)
+endif
+endif
 
 check: test
 
-- 
2.4.3

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

* Re: [PATCH] make test: NOTMUCH_TEST_QUIET=1 is now the default
  2015-09-11 20:44 [PATCH] make test: NOTMUCH_TEST_QUIET=1 is now the default Tomi Ollila
@ 2015-09-20 11:31 ` David Bremner
  2015-09-20 12:28   ` Tomi Ollila
  2015-09-25 11:51 ` David Bremner
  1 sibling, 1 reply; 5+ messages in thread
From: David Bremner @ 2015-09-20 11:31 UTC (permalink / raw)
  To: Tomi Ollila, notmuch; +Cc: tomi.ollila

Tomi Ollila <tomi.ollila@iki.fi> writes:

> make test V=1 (or any other value than 0) and make test V=0
> works similar way as build in general
> ---
>
> This is 2nd try: In first one I changed test-lib.sh -- there problem
> was the precedence between command line argument and NOTMUCH_TEST_QUIET
> environment variable. Here I don't see a problem there (although
> env NOTMUCH_TEST_QUIET=1 make test V=1 will make environment variable
> overrule the V=1 -- I am not sure who cares, though :D)
>
> Anyway, Someone(TM) may have better solution in mind, so let's
> get bikeshedding going!
>

One thing I thought of was that we could replace the use of
NOTMUCH_TEST_QUIET with e.g. NOTMUCH_TEST_VERBOSE, and have that set by
the command line argument --verbose.  This would be less work on the
Makefile side, but I guess a bit more on the test-lib.sh side. I suppose
it might also be an annoyance for some people currently using
NOTMUCH_TEST_QUIET in some autobuilder setup. At the moment I can't
think of what would really break by changing this "API", but knows. The
current behaviour of having NOTMUCH_TEST_QUIET and --verbose completely
independent is pretty surprising.

d

P.S. I hope you appreciate my classic "scope-creep" technique in
bikeshedding. ;)

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

* Re: [PATCH] make test: NOTMUCH_TEST_QUIET=1 is now the default
  2015-09-20 11:31 ` David Bremner
@ 2015-09-20 12:28   ` Tomi Ollila
  2015-09-24 12:13     ` David Bremner
  0 siblings, 1 reply; 5+ messages in thread
From: Tomi Ollila @ 2015-09-20 12:28 UTC (permalink / raw)
  To: David Bremner, notmuch

On Sun, Sep 20 2015, David Bremner <david@tethera.net> wrote:

> Tomi Ollila <tomi.ollila@iki.fi> writes:
>
>> make test V=1 (or any other value than 0) and make test V=0
>> works similar way as build in general
>> ---
>>
>> This is 2nd try: In first one I changed test-lib.sh -- there problem
>> was the precedence between command line argument and NOTMUCH_TEST_QUIET
>> environment variable. Here I don't see a problem there (although
>> env NOTMUCH_TEST_QUIET=1 make test V=1 will make environment variable
>> overrule the V=1 -- I am not sure who cares, though :D)
>>
>> Anyway, Someone(TM) may have better solution in mind, so let's
>> get bikeshedding going!
>>
>
> One thing I thought of was that we could replace the use of
> NOTMUCH_TEST_QUIET with e.g. NOTMUCH_TEST_VERBOSE, and have that set by
> the command line argument --verbose.  This would be less work on the
> Makefile side, but I guess a bit more on the test-lib.sh side. I suppose
> it might also be an annoyance for some people currently using
> NOTMUCH_TEST_QUIET in some autobuilder setup. At the moment I can't
> think of what would really break by changing this "API", but knows. The
> current behaviour of having NOTMUCH_TEST_QUIET and --verbose completely
> independent is pretty surprising.

There was 2 primary motivations when I did that patch (which I forgot to
mark rfc although I thought doing so) 1) that was the fastest at the time
being and 2) the --verbose is already in use in test-lib.sh. 

First thing that come to my mind is that if (-v|--v[e[r[b[o[s[e]]]]]])
option is for the suggested purpose its current behaviour is removed
and when the option is not give user is informed how to activate "verbose"
progress -- but as said that is just first thought...


Making NOTMUCH_TEST_QUIET no-op is probably no annoyance to anyone...

>
> d
>
> P.S. I hope you appreciate my classic "scope-creep" technique in
> bikeshedding. ;)

In test-related issues that is fine by me.


Tomi

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

* Re: [PATCH] make test: NOTMUCH_TEST_QUIET=1 is now the default
  2015-09-20 12:28   ` Tomi Ollila
@ 2015-09-24 12:13     ` David Bremner
  0 siblings, 0 replies; 5+ messages in thread
From: David Bremner @ 2015-09-24 12:13 UTC (permalink / raw)
  To: Tomi Ollila, notmuch

Tomi Ollila <tomi.ollila@iki.fi> writes:
>
> There was 2 primary motivations when I did that patch (which I forgot to
> mark rfc although I thought doing so) 1) that was the fastest at the time
> being and 2) the --verbose is already in use in test-lib.sh. 
>
> First thing that come to my mind is that if (-v|--v[e[r[b[o[s[e]]]]]])
> option is for the suggested purpose its current behaviour is removed
> and when the option is not give user is informed how to activate "verbose"
> progress -- but as said that is just first thought...
>
>
> Making NOTMUCH_TEST_QUIET no-op is probably no annoyance to anyone...
>

For the moment, I think this patch is good enough. Maybe we can make the
interaction with --verbose make more sense in the future, but it's
really an independant issue.

d

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

* Re: [PATCH] make test: NOTMUCH_TEST_QUIET=1 is now the default
  2015-09-11 20:44 [PATCH] make test: NOTMUCH_TEST_QUIET=1 is now the default Tomi Ollila
  2015-09-20 11:31 ` David Bremner
@ 2015-09-25 11:51 ` David Bremner
  1 sibling, 0 replies; 5+ messages in thread
From: David Bremner @ 2015-09-25 11:51 UTC (permalink / raw)
  To: Tomi Ollila, notmuch

Tomi Ollila <tomi.ollila@iki.fi> writes:

> make test V=1 (or any other value than 0) and make test V=0
> works similar way as build in general

pushed,

d

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

end of thread, other threads:[~2015-09-25 11:53 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-09-11 20:44 [PATCH] make test: NOTMUCH_TEST_QUIET=1 is now the default Tomi Ollila
2015-09-20 11:31 ` David Bremner
2015-09-20 12:28   ` Tomi Ollila
2015-09-24 12:13     ` David Bremner
2015-09-25 11:51 ` 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).