svn commit: r122798 - /httpd/test/trunk/perl-framework/Apache-Test/Makefile.PL
Author: stas Date: Sun Dec 19 19:41:37 2004 New Revision: 122798 URL: http://svn.apache.org/viewcvs?view=revrev=122798 Log: avoid warning: used only once: possible typo at ... Modified: httpd/test/trunk/perl-framework/Apache-Test/Makefile.PL Modified: httpd/test/trunk/perl-framework/Apache-Test/Makefile.PL Url: http://svn.apache.org/viewcvs/httpd/test/trunk/perl-framework/Apache-Test/Makefile.PL?view=diffrev=122798p1=httpd/test/trunk/perl-framework/Apache-Test/Makefile.PLr1=122797p2=httpd/test/trunk/perl-framework/Apache-Test/Makefile.PLr2=122798 == --- httpd/test/trunk/perl-framework/Apache-Test/Makefile.PL (original) +++ httpd/test/trunk/perl-framework/Apache-Test/Makefile.PL Sun Dec 19 19:41:37 2004 @@ -145,7 +145,6 @@ # now that we're using subversion, make sure that # .svn directories are skipped during the build process # for old versions of MakeMaker - *MY::libscan = sub { my $self = shift; @@ -155,6 +154,8 @@ return $path; }; +# avoid warning: used only once: possible typo at ... +*MY::libscan = *MY::libscan; } sub MY::postamble { @@ -207,7 +208,7 @@ $string; }; -*MY::top_targets = sub { +*MY::top_targets = sub { my $self = shift; my $string = $self-MM::top_targets;
svn commit: r122807 - in httpd/test/trunk/perl-framework/Apache-Test: . Apache-TestItSelf Apache-TestItSelf/Apache-TestMe Apache-TestItSelf/Apache-TestMe/t Apache-TestItSelf/Apache-TestMe/t/basic Apache-TestItSelf/Apache-TestMe/t/conf Apache-TestItSelf/Apache-TestMe/t/response Apache-TestItSelf/Apache-TestMe/t/response/TestBasic Apache-TestItSelf/lib Apache-TestItSelf/lib/MyTest Apache-TestItSelf/sample Apache-TestItSelf/t
Author: stas Date: Sun Dec 19 20:06:54 2004 New Revision: 122807 URL: http://svn.apache.org/viewcvs?view=revrev=122807 Log: add Apache-TestItSelf and Apache-TestMe sub-projects. Added: httpd/test/trunk/perl-framework/Apache-Test/Apache-TestItSelf/ httpd/test/trunk/perl-framework/Apache-Test/Apache-TestItSelf/Apache-TestMe/ httpd/test/trunk/perl-framework/Apache-Test/Apache-TestItSelf/Apache-TestMe/Changes httpd/test/trunk/perl-framework/Apache-Test/Apache-TestItSelf/Apache-TestMe/Makefile.PL httpd/test/trunk/perl-framework/Apache-Test/Apache-TestItSelf/Apache-TestMe/README httpd/test/trunk/perl-framework/Apache-Test/Apache-TestItSelf/Apache-TestMe/t/ httpd/test/trunk/perl-framework/Apache-Test/Apache-TestItSelf/Apache-TestMe/t/TEST.PL httpd/test/trunk/perl-framework/Apache-Test/Apache-TestItSelf/Apache-TestMe/t/basic/ httpd/test/trunk/perl-framework/Apache-Test/Apache-TestItSelf/Apache-TestMe/t/basic/hello.t httpd/test/trunk/perl-framework/Apache-Test/Apache-TestItSelf/Apache-TestMe/t/conf/ httpd/test/trunk/perl-framework/Apache-Test/Apache-TestItSelf/Apache-TestMe/t/conf/modperl_extra.pl (contents, props changed) httpd/test/trunk/perl-framework/Apache-Test/Apache-TestItSelf/Apache-TestMe/t/response/ httpd/test/trunk/perl-framework/Apache-Test/Apache-TestItSelf/Apache-TestMe/t/response/TestBasic/ httpd/test/trunk/perl-framework/Apache-Test/Apache-TestItSelf/Apache-TestMe/t/response/TestBasic/Hello.pm httpd/test/trunk/perl-framework/Apache-Test/Apache-TestItSelf/Changes httpd/test/trunk/perl-framework/Apache-Test/Apache-TestItSelf/Makefile.PL httpd/test/trunk/perl-framework/Apache-Test/Apache-TestItSelf/README httpd/test/trunk/perl-framework/Apache-Test/Apache-TestItSelf/lib/ httpd/test/trunk/perl-framework/Apache-Test/Apache-TestItSelf/lib/MyTest/ httpd/test/trunk/perl-framework/Apache-Test/Apache-TestItSelf/lib/MyTest/Util.pm httpd/test/trunk/perl-framework/Apache-Test/Apache-TestItSelf/sample/ httpd/test/trunk/perl-framework/Apache-Test/Apache-TestItSelf/sample/apache2_modules_testitself_config.pm httpd/test/trunk/perl-framework/Apache-Test/Apache-TestItSelf/sample/apache_test_config.pm httpd/test/trunk/perl-framework/Apache-Test/Apache-TestItSelf/sample/modperl2_testitself_config.pm httpd/test/trunk/perl-framework/Apache-Test/Apache-TestItSelf/t/ httpd/test/trunk/perl-framework/Apache-Test/Apache-TestItSelf/t/TEST.PL httpd/test/trunk/perl-framework/Apache-Test/Apache-TestItSelf/t/httpd_arg.t httpd/test/trunk/perl-framework/Apache-Test/Apache-TestItSelf/t/interactive.t Modified: httpd/test/trunk/perl-framework/Apache-Test/Changes httpd/test/trunk/perl-framework/Apache-Test/META.yml httpd/test/trunk/perl-framework/Apache-Test/Makefile.PL Added: httpd/test/trunk/perl-framework/Apache-Test/Apache-TestItSelf/Apache-TestMe/Changes Url: http://svn.apache.org/viewcvs/httpd/test/trunk/perl-framework/Apache-Test/Apache-TestItSelf/Apache-TestMe/Changes?view=autorev=122807 == --- (empty file) +++ httpd/test/trunk/perl-framework/Apache-Test/Apache-TestItSelf/Apache-TestMe/Changes Sun Dec 19 20:06:54 2004 @@ -0,0 +1,17 @@ +=head1 NAME + +Changes - Apache::TestMe changes logfile + +=head1 Changes + +=over 4 + +=item 0.01 + +write a basic mod_perl test: basic/hello.t + +starting the config test suite used by Apache::TestItSelf + +=back + +=cut \ No newline at end of file Added: httpd/test/trunk/perl-framework/Apache-Test/Apache-TestItSelf/Apache-TestMe/Makefile.PL Url: http://svn.apache.org/viewcvs/httpd/test/trunk/perl-framework/Apache-Test/Apache-TestItSelf/Apache-TestMe/Makefile.PL?view=autorev=122807 == --- (empty file) +++ httpd/test/trunk/perl-framework/Apache-Test/Apache-TestItSelf/Apache-TestMe/Makefile.PL Sun Dec 19 20:06:54 2004 @@ -0,0 +1,217 @@ +use 5.005; + +use lib qw(../../lib); # Apache-Test/lib + +use Apache::TestMM qw(test clean); +use Apache::TestMM (); +use Apache::TestReport; + +use ExtUtils::MakeMaker (); + +my $mp_gen = satisfy_mp_generation(); +warn Goind to build against mod_perl/$mod_perl::VERSION Perl/$]\n; + +Apache::TestMM::filter_args(); + +my @scripts = qw(t/TEST); +for (@scripts) { +Apache::TestMM::generate_script($_); +} +Apache::TestReport-generate_script; + +my @clean_files = (@scripts, qw(t/REPORT)); + + +my %common_opts = ( +NAME = 'Apache-TestMe', +VERSION = '0.01', +clean = { +FILES = @clean_files, +}, +); + +if ($mp_gen == 1) { +require ExtUtils::MakeMaker; +ExtUtils::MakeMaker::WriteMakefile( +%common_opts, +); + +} +else { +require Apache2; +require ModPerl::MM; +ModPerl::MM::WriteMakefile( +%common_opts, +); +} +# If a specific generation was passed as an argument, +# if satisfied +# return the same
svn commit: r122813 - /httpd/test/trunk/perl-framework/Apache-Test/lib/Apache/TestConfig.pm
Author: stas Date: Sun Dec 19 21:26:52 2004 New Revision: 122813 URL: http://svn.apache.org/viewcvs?view=revrev=122813 Log: use debug() instead of error() to avoid noise Modified: httpd/test/trunk/perl-framework/Apache-Test/lib/Apache/TestConfig.pm Modified: httpd/test/trunk/perl-framework/Apache-Test/lib/Apache/TestConfig.pm Url: http://svn.apache.org/viewcvs/httpd/test/trunk/perl-framework/Apache-Test/lib/Apache/TestConfig.pm?view=diffrev=122813p1=httpd/test/trunk/perl-framework/Apache-Test/lib/Apache/TestConfig.pmr1=122812p2=httpd/test/trunk/perl-framework/Apache-Test/lib/Apache/TestConfig.pmr2=122813 == --- httpd/test/trunk/perl-framework/Apache-Test/lib/Apache/TestConfig.pm (original) +++ httpd/test/trunk/perl-framework/Apache-Test/lib/Apache/TestConfig.pm Sun Dec 19 21:26:52 2004 @@ -1881,7 +1881,7 @@ my $mode = (stat _)[2]; my $mode_new = $mode | 0200; chmod $mode_new, $path; -error emptying $path; +debug emptying $path; Apache::TestConfig::custom_config_write($path, ''); chmod $mode, $path; }
svn commit: r122855 - /httpd/test/trunk/perl-framework/Apache-Test/Changes /httpd/test/trunk/perl-framework/Apache-Test/lib/Apache/TestConfig.pm
Author: stas Date: Mon Dec 20 07:10:15 2004 New Revision: 122855 URL: http://svn.apache.org/viewcvs?view=revrev=122855 Log: refactor some dups into find_and_load_module() wrapper Contributed by: Chia-Liang Kao [EMAIL PROTECTED] Modified: httpd/test/trunk/perl-framework/Apache-Test/Changes httpd/test/trunk/perl-framework/Apache-Test/lib/Apache/TestConfig.pm Modified: httpd/test/trunk/perl-framework/Apache-Test/Changes Url: http://svn.apache.org/viewcvs/httpd/test/trunk/perl-framework/Apache-Test/Changes?view=diffrev=122855p1=httpd/test/trunk/perl-framework/Apache-Test/Changesr1=122854p2=httpd/test/trunk/perl-framework/Apache-Test/Changesr2=122855 == --- httpd/test/trunk/perl-framework/Apache-Test/Changes (original) +++ httpd/test/trunk/perl-framework/Apache-Test/Changes Mon Dec 20 07:10:15 2004 @@ -8,6 +8,10 @@ =item 1.18-dev + +new TestConfig wrapper find_and_load_module [Chia-Liang Kao chialiang +gmail.com] + add Apache-TestItSelf and Apache-TestMe sub-projects. [Stas] add various straps to aid the new Apache-TestItSelf sub-project, which Modified: httpd/test/trunk/perl-framework/Apache-Test/lib/Apache/TestConfig.pm Url: http://svn.apache.org/viewcvs/httpd/test/trunk/perl-framework/Apache-Test/lib/Apache/TestConfig.pm?view=diffrev=122855p1=httpd/test/trunk/perl-framework/Apache-Test/lib/Apache/TestConfig.pmr1=122854p2=httpd/test/trunk/perl-framework/Apache-Test/lib/Apache/TestConfig.pmr2=122855 == --- httpd/test/trunk/perl-framework/Apache-Test/lib/Apache/TestConfig.pm (original) +++ httpd/test/trunk/perl-framework/Apache-Test/lib/Apache/TestConfig.pm Mon Dec 20 07:10:15 2004 @@ -1212,6 +1212,18 @@ }; } +sub find_and_load_module { +my ($self, $name) = @_; +my $mod_path = $self-find_apache_module($name) or return; +my ($sym) = $name =~ m/mod_(\w+)\./; + +if ($mod_path -e $mod_path) { +$self-preamble(IfModule = !$name, +qq{LoadModule ${sym}_module $mod_path\n}); +} +return 1; +} + sub replace_vhost_modules { my $self = shift; @@ -1265,11 +1277,7 @@ # handle the case when mod_mime is built as a shared object # but wasn't included in the system-wide httpd.conf -my $mod_mime = $self-find_apache_module('mod_mime.so'); -if ($mod_mime -e $mod_mime) { -$self-preamble(IfModule = '!mod_mime.c', -qq{LoadModule mime_module $mod_mime\n}); -} +$self-find_and_load_module('mod_mime.so'); unless ($self-{inherit_config}-{TypesConfig}) { my $types = catfile $self-{vars}-{t_conf}, 'mime.types'; @@ -1521,6 +1529,8 @@ my $out = $self-genfile($conf_file); +$self-find_and_load_module('mod_alias.so'); + $self-preamble_run($out); for my $name (qw(user group)) { #win32/cygwin do not support @@ -1542,14 +1552,6 @@ # handle the case when mod_alias is built as a shared object # but wasn't included in the system-wide httpd.conf -my $mod_alias = $self-find_apache_module('mod_alias.so'); -if ($mod_alias -e $mod_alias) { -print $out EOF; -IfModule !mod_alias.c -LoadModule alias_module $mod_alias -/IfModule -EOF -} print $out IfModule mod_alias.c\n; for (keys %aliases) {
svn commit: r122882 - /httpd/test/trunk/perl-framework/Apache-Test/lib/Apache/Test.pm /httpd/test/trunk/perl-framework/Apache-Test/t/more/all.t
Author: stas Date: Mon Dec 20 13:37:34 2004 New Revision: 122882 URL: http://svn.apache.org/viewcvs?view=revrev=122882 Log: cleanups Modified: httpd/test/trunk/perl-framework/Apache-Test/lib/Apache/Test.pm httpd/test/trunk/perl-framework/Apache-Test/t/more/all.t Modified: httpd/test/trunk/perl-framework/Apache-Test/lib/Apache/Test.pm Url: http://svn.apache.org/viewcvs/httpd/test/trunk/perl-framework/Apache-Test/lib/Apache/Test.pm?view=diffrev=122882p1=httpd/test/trunk/perl-framework/Apache-Test/lib/Apache/Test.pmr1=122881p2=httpd/test/trunk/perl-framework/Apache-Test/lib/Apache/Test.pmr2=122882 == --- httpd/test/trunk/perl-framework/Apache-Test/lib/Apache/Test.pm (original) +++ httpd/test/trunk/perl-framework/Apache-Test/lib/Apache/Test.pm Mon Dec 20 13:37:34 2004 @@ -132,7 +132,6 @@ #so Perl's Test.pm can be run inside mod_perl sub test_pm_refresh { if (@testmore) { - Test::Builder-reset; Test::Builder-output(\*STDOUT); Modified: httpd/test/trunk/perl-framework/Apache-Test/t/more/all.t Url: http://svn.apache.org/viewcvs/httpd/test/trunk/perl-framework/Apache-Test/t/more/all.t?view=diffrev=122882p1=httpd/test/trunk/perl-framework/Apache-Test/t/more/all.tr1=122881p2=httpd/test/trunk/perl-framework/Apache-Test/t/more/all.tr2=122882 == --- httpd/test/trunk/perl-framework/Apache-Test/t/more/all.t(original) +++ httpd/test/trunk/perl-framework/Apache-Test/t/more/all.tMon Dec 20 13:37:34 2004 @@ -6,8 +6,8 @@ use Apache::Test; -plan tests = 1, (need_min_module_version(qw(Test::More 0.48_01)) - need_module('mod_perl.c')); +plan tests = 1, need need_min_module_version(qw(Test::More 0.48_01)), +need_module('mod_perl.c'); ok 1;
svn commit: r122883 - /httpd/test/trunk/perl-framework/Apache-Test/Apache-TestItSelf/t/httpd_arg.t
Author: stas Date: Mon Dec 20 13:47:29 2004 New Revision: 122883 URL: http://svn.apache.org/viewcvs?view=revrev=122883 Log: use a proper skip block Modified: httpd/test/trunk/perl-framework/Apache-Test/Apache-TestItSelf/t/httpd_arg.t Modified: httpd/test/trunk/perl-framework/Apache-Test/Apache-TestItSelf/t/httpd_arg.t Url: http://svn.apache.org/viewcvs/httpd/test/trunk/perl-framework/Apache-Test/Apache-TestItSelf/t/httpd_arg.t?view=diffrev=122883p1=httpd/test/trunk/perl-framework/Apache-Test/Apache-TestItSelf/t/httpd_arg.tr1=122882p2=httpd/test/trunk/perl-framework/Apache-Test/Apache-TestItSelf/t/httpd_arg.tr2=122883 == --- httpd/test/trunk/perl-framework/Apache-Test/Apache-TestItSelf/t/httpd_arg.t (original) +++ httpd/test/trunk/perl-framework/Apache-Test/Apache-TestItSelf/t/httpd_arg.t Mon Dec 20 13:47:29 2004 @@ -104,13 +104,12 @@ unlike $err, qr/\[ error\]/, $cmd; # test that httpd is found in t/REPORT (if exists) -$cmd = t/REPORT; -if (-e $cmd) { +SKIP: { +$cmd = t/REPORT; +skip $cmd doesn't exist, 1 unless -e $cmd; + ($out, $err) = myrun3($cmd); like $out, qr/Server version: $c-{httpd_version}/, $cmd; -} -else { -ok 1; } }
svn commit: r122903 - /httpd/test/trunk/perl-framework/Apache-Test/Apache-TestItSelf
Author: gozer Date: Mon Dec 20 15:33:19 2004 New Revision: 122903 URL: http://svn.apache.org/viewcvs?view=revrev=122903 Log: Ignore pm_to_blib Modified: httpd/test/trunk/perl-framework/Apache-Test/Apache-TestItSelf/ (props changed)
svn commit: r122906 - in httpd/test/trunk/perl-framework/Apache-Test: . Apache-TestItSelf Apache-TestItSelf/Apache-TestMe Apache-TestItSelf/Apache-TestMe/t/basic Apache-TestItSelf/Apache-TestMe/t/conf Apache-TestItSelf/Apache-TestMe/t/response/TestBasic Apache-TestItSelf/t lib/Apache
Author: stas Date: Mon Dec 20 15:42:20 2004 New Revision: 122906 URL: http://svn.apache.org/viewcvs?view=revrev=122906 Log: - fix a bug in A-T config generation, when a vhost entry was in autogenerated httpd.conf (e.g. coming from .pm file) and another from extra.conf.in. We used to have a ports collision, since extra.conf wasn't reparsed and the same port was getting assigned to more than one vhost entry, preventing server startup: default_ VirtualHost overlap on port 8530, the first has precedence (98)Address already in use: make_sock: could not bind to address 0.0.0.0:8530 no listening sockets available, shutting down could be reproduced with t/TEST -conf followed by t/TEST -maxclients 1 in the mp2 test suite (or the new Apache-TestMe test suite, which now includes a special setup for this bug). - added a test reproducing this problem in Apache-TestItSelf - added the setup required to reproduce this problem in Apache-TestMe Added: httpd/test/trunk/perl-framework/Apache-Test/Apache-TestItSelf/Apache-TestMe/t/basic/vhost.t (contents, props changed) httpd/test/trunk/perl-framework/Apache-Test/Apache-TestItSelf/Apache-TestMe/t/conf/extra.conf.in httpd/test/trunk/perl-framework/Apache-Test/Apache-TestItSelf/Apache-TestMe/t/response/TestBasic/Vhost.pm (contents, props changed) httpd/test/trunk/perl-framework/Apache-Test/Apache-TestItSelf/t/minmaxclients.t (contents, props changed) Modified: httpd/test/trunk/perl-framework/Apache-Test/Apache-TestItSelf/ (props changed) httpd/test/trunk/perl-framework/Apache-Test/Apache-TestItSelf/Apache-TestMe/Changes httpd/test/trunk/perl-framework/Apache-Test/Apache-TestItSelf/Apache-TestMe/t/conf/ (props changed) httpd/test/trunk/perl-framework/Apache-Test/Apache-TestItSelf/Changes httpd/test/trunk/perl-framework/Apache-Test/Changes httpd/test/trunk/perl-framework/Apache-Test/lib/Apache/TestConfig.pm Modified: httpd/test/trunk/perl-framework/Apache-Test/Apache-TestItSelf/Apache-TestMe/Changes Url: http://svn.apache.org/viewcvs/httpd/test/trunk/perl-framework/Apache-Test/Apache-TestItSelf/Apache-TestMe/Changes?view=diffrev=122906p1=httpd/test/trunk/perl-framework/Apache-Test/Apache-TestItSelf/Apache-TestMe/Changesr1=122905p2=httpd/test/trunk/perl-framework/Apache-Test/Apache-TestItSelf/Apache-TestMe/Changesr2=122906 == --- httpd/test/trunk/perl-framework/Apache-Test/Apache-TestItSelf/Apache-TestMe/Changes (original) +++ httpd/test/trunk/perl-framework/Apache-Test/Apache-TestItSelf/Apache-TestMe/Changes Mon Dec 20 15:42:20 2004 @@ -8,9 +8,13 @@ =item 0.01 -write a basic mod_perl test: basic/hello.t +new test basic/vhost.t which introduces a vhost entry in .pm. also +added a dummy vhost entry in t/conf/extra.conf.in, the setup needed by +t/minmaxclients.t from Apache-TestItSelf [Stas] -starting the config test suite used by Apache::TestItSelf +write a basic mod_perl test: basic/hello.t [Stas] + +starting the config test suite used by Apache::TestItSelf [Stas] =back Added: httpd/test/trunk/perl-framework/Apache-Test/Apache-TestItSelf/Apache-TestMe/t/basic/vhost.t Url: http://svn.apache.org/viewcvs/httpd/test/trunk/perl-framework/Apache-Test/Apache-TestItSelf/Apache-TestMe/t/basic/vhost.t?view=autorev=122906 == --- (empty file) +++ httpd/test/trunk/perl-framework/Apache-Test/Apache-TestItSelf/Apache-TestMe/t/basic/vhost.t Mon Dec 20 15:42:20 2004 @@ -0,0 +1,7 @@ +use Apache::TestUtil; +use Apache::TestRequest 'GET_BODY_ASSERT'; + +my $module = 'TestBasic::Vhost'; +my $url= Apache::TestRequest::module2url($module); +t_debug(connecting to $url); +print GET_BODY_ASSERT $url; Added: httpd/test/trunk/perl-framework/Apache-Test/Apache-TestItSelf/Apache-TestMe/t/conf/extra.conf.in Url: http://svn.apache.org/viewcvs/httpd/test/trunk/perl-framework/Apache-Test/Apache-TestItSelf/Apache-TestMe/t/conf/extra.conf.in?view=autorev=122906 == --- (empty file) +++ httpd/test/trunk/perl-framework/Apache-Test/Apache-TestItSelf/Apache-TestMe/t/conf/extra.conf.in Mon Dec 20 15:42:20 2004 @@ -0,0 +1,16 @@ +# this vhost entry is needed to check that when t/TEST -maxclients 1 +# or similar is called after t/TEST -conf was run, and extra.conf +# includes a vhost entry and httpd.conf includes an autogenerated +# vhost entry from some .pm file, we used to have a collision, since +# extra.conf wasn't reparsed and the same port was getting assigned to +# more than one vhost entry, preventing server startup: +# +#default_ VirtualHost overlap on port 8530, the first has precedence +#(98)Address already in use: make_sock: could not bind to address +#0.0.0.0:8530 no listening sockets available, shutting down +# +# XXX: for now using a dummy vhost entry. later if needed to put a +# real vhost