httpd-test-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stas Bekman <s...@stason.org>
Subject Re: cvs commit: httpd-test/perl-framework/Apache-Test README
Date Sun, 19 May 2002 19:13:59 GMT
Doug MacEachern wrote:
> On 19 May 2002 stas@apache.org wrote:
> 
> 
>>stas        02/05/19 00:56:32
>>
>>  Modified:    perl-framework/Apache-Test/lib/Apache TestConfig.pm
>>               perl-framework/Apache-Test README
>>  Log:
>>  make the APACHE_TEST_COLOR env setting work when running from script
>>  if running as batch, simply make sure that it's not set
>>  updating the docs
> 
> ...
> 
>>  -use constant COLOR   => ($ENV{APACHE_TEST_COLOR} && -t STDOUT) ? 1 :
0;
>>  +use constant COLOR   => $ENV{APACHE_TEST_COLOR} ? 1 : 0;
> 
> ...
> 
>>  +When running in the batch mode and redirecting STDOUT to a file, make
>>  +sure that the environment variable C<APACHE_TEST_COLOR> is set to 0 or
>>  +not set at all.
> 
> 
> why this change?  from perlfunc.pod:
>     -t	Filehandle is opened to a tty.
> 
> color should always be turned off if that is not true.
> 
> i have APACHE_TEST_COLOR turned on in my shell rc file, but now i have to 
> unset it by hand when i do: t/TEST -v >& test.log
> 
> with the -t test, that hassle does not exist.

ouch :(

Because the color setting doesn't have any effect if you build using the 
script. e.g. before my change this script won't work with colors:

#!/bin/sh
make clean
APACHE_TEST_COLOR=1; export APACHE_TEST_COLOR
/home/stas/perl/ithread/bin/perl Makefile.PL ...
... make && make test

notice that this script doesn't redirect anything from within itself, 
and I don't redirect its output when calling it.

may be -t is not what we want? or may be it's not enough? and some other 
check is needed?

can you reproduce my problem?

__________________________________________________________________
Stas Bekman            JAm_pH ------> Just Another mod_perl Hacker
http://stason.org/     mod_perl Guide ---> http://perl.apache.org
mailto:stas@stason.org http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org   http://ticketmaster.com


Mime
View raw message