automake-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: colorful tests


From: Bob Proulx
Subject: Re: colorful tests
Date: Sun, 4 Nov 2007 17:13:11 -0700
User-agent: Mutt/1.5.13 (2006-08-11)

Benoit SIGOURE wrote:
> Ralf Wildenhues wrote:
> >Of course the step of making color-tests the default could also be
> >done some time later.  (Maybe including also a no-color-tests for
> >die-hards.)

I would like a way to force color off.  But I can't think of a good
control lever for doing it.

> >Further, user's should have a say in this, too.  Do you think it's
> >acceptable to tell them  "Use `TERM=dumb make check' if you don't
> >want colorized output, or pipe output through `cat'"?

Piping through 'cat' washes the return code which then becomes the
status of whether cat was successful and not whether the tests were
successful.  (I thought of that myself until I tried it. :-)

> >Or should we have (gasp!) yet another configure switch,
> >--disable-color-tests?
> 
> I think we should leave it as-is for some time.  Since the option is  
> used in Automake itself, it give a chance to all the people  
> developing/testing/using bleeding edge Automake to test this  
> feature.  If everyone's happy with it in, say, a couple of months, we  
> can safely make it a default.
> Now I think that the no-color-tests could be useful for those out  
> there that are allergic to fancy colors and stuff, so I think it'll  
> be worth implementing it (which is easy).

I am not quite alergic to it but put me in the black and white camp in
general.  For example when capturing output with 'script' all of those
escape sequences get in the way.

> I don't like the idea of yet another configure switch...  configure  
> scripts are already large enough and since this option would only  
> change a small aesthetic aspect of the package, it's not worth the  
> price.  OTOH, we can indeed document the TERM=dumb trick or maybe add  
> another variable, but that's probably not the cleverest thing to do.   
> Indeed, what if the testsuite needs a working terminal for some  
> reason?

A very good point.

> We could use another variable, say, NOCOLOR, and people would do
> `make check NOCOLOR=whatever'.  We simply need to throw a test
> x$(NOCOLOR) = x in the `&&' pipeline that decides whether colors
> must be used or not.

Something more namespace safe than NOCOLOR though.  I think it would
need to be more specific such as AUTOMAKE_NOCOLOR=yes or some such.

Bob




reply via email to

[Prev in Thread] Current Thread [Next in Thread]