hi all...
today I took a stab at fixing a nit that's bothered me for a while...
$ make test TEST_VERBOSE=1
doesn't work with the Apache::Test stuff. I know I can run tests individually with the -verbose flag, but I didn't see any reason why Apache::Test can't follow the standard ExtUtils::MakeMaker pattern and let me see all the tests (in verbose mode) at once.
the attached patch offers a solution. the only problem I can see with it is that TEST_VERBOSE=0 actually triggers the verbosity, but I figured that it was a trade-off between that and a few extra ifeq statements cluttering up the code.
I tested the patch against the test suite for Apache::Test proper and mod_perl - both worked just fine with and without TEST_VERBOSE populated. (some output below)
--Geoff
[EMAIL PROTECTED] Apache-Test]$ make test TEST_VERBOSE=1
/src/bleedperl/bin/perl -Iblib/arch -Iblib/lib \
t/TEST -clean
*** setting ulimit to allow core files
ulimit -c unlimited; t/TEST -clean
APACHE_USER= APACHE_GROUP= APACHE_PORT= APACHE=/usr/local/apache/bin/httpd APXS= \
/src/bleedperl/bin/perl -Iblib/arch -Iblib/lib \
t/TEST -verbose
*** setting ulimit to allow core files
ulimit -c unlimited; t/TEST -verbose
/usr/local/apache/bin/httpd -X -d /src/httpd-test/perl-framework/Apache-Test/t -f /src/httpd-test/perl-framework/Apache-Test/t/conf/httpd.conf -DAPACHE1 -DPERL_USEITHREADS
using Apache/1.3.27-dev
waiting for server to start: .. waiting for server to start: ok (waited 1 secs) server localhost:8529 started ping.......1..3 # Running under perl version 5.009 for linux # Current time local: Tue Sep 17 19:38:30 2002 # Current time GMT: Tue Sep 17 15:38:30 2002 # Using Test.pm version 1.21 ok 1 ok 2 ok 3 ok request....1..9 # Running under perl version 5.009 for linux # Current time local: Tue Sep 17 19:38:35 2002 # Current time GMT: Tue Sep 17 15:38:35 2002 # Using Test.pm version 1.21 ok 1 ok 2 ok 3 ok 4 ok 5 ok 6 ok 7 ok 8 ok 9 ok All tests successful. Files=2, Tests=12, 12 wallclock secs ( 5.84 cusr + 0.40 csys = 6.24 CPU) *** server localhost:8529 shutdown
[EMAIL PROTECTED] Apache-Test]$ make test
/src/bleedperl/bin/perl -Iblib/arch -Iblib/lib \
t/TEST -clean
*** setting ulimit to allow core files
ulimit -c unlimited; t/TEST -clean
APACHE_USER= APACHE_GROUP= APACHE_PORT= APACHE=/usr/local/apache/bin/httpd APXS= \
/src/bleedperl/bin/perl -Iblib/arch -Iblib/lib \
t/TEST
*** setting ulimit to allow core files
ulimit -c unlimited; t/TEST
/usr/local/apache/bin/httpd -X -d /src/httpd-test/perl-framework/Apache-Test/t -f /src/httpd-test/perl-framework/Apache-Test/t/conf/httpd.conf -DAPACHE1 -DPERL_USEITHREADS
using Apache/1.3.27-dev
waiting for server to start: .
waiting for server to start: ok (waited 0 secs)
server localhost:8529 started
ping.......ok
request....ok
All tests successful. Files=2, Tests=12, 13 wallclock secs ( 6.01 cusr + 0.23 csys = 6.24 CPU) *** server localhost:8529 shutdown
? verbose.patch ? lib/Apache/TestMM.log ? lib/Apache/assbackwards.patch Index: lib/Apache/TestMM.pm =================================================================== RCS file: /home/cvspublic/httpd-test/perl-framework/Apache-Test/lib/Apache/TestMM.pm,v retrieving revision 1.16 diff -u -r1.16 TestMM.pm --- lib/Apache/TestMM.pm 9 Apr 2002 07:38:57 -0000 1.16 +++ lib/Apache/TestMM.pm 17 Sep 2002 19:32:03 -0000 @@ -44,6 +44,10 @@ EOF return $preamble . <<'EOF'; +ifdef TEST_VERBOSE + override TEST_VERBOSE = -verbose +endif + test_clean : $(FULLPERL) -I$(INST_ARCHLIB) -I$(INST_LIB) \ t/TEST -clean @@ -51,7 +55,7 @@ run_tests : test_clean $(PASSENV) \ $(FULLPERL) -I$(INST_ARCHLIB) -I$(INST_LIB) \ - t/TEST + t/TEST $(TEST_VERBOSE) test :: pure_all run_tests test_clean