stas 2004/09/05 09:30:30
Modified: perl-framework/Apache-Test Changes Makefile.PL perl-framework/Apache-Test/lib/Apache TestConfig.pm Log: don't allow running an explicit 'perl Makefile.PL', when Apache-Test is checked out into the modperl-2.0 tree, since it then decides that it's a part of the modperl-2.0 build and will try to use modperl httpd/apxs arguments which could be unset or wrong Revision Changes Path 1.163 +4 -4 httpd-test/perl-framework/Apache-Test/Changes Index: Changes =================================================================== RCS file: /home/cvs/httpd-test/perl-framework/Apache-Test/Changes,v retrieving revision 1.162 retrieving revision 1.163 diff -u -u -r1.162 -r1.163 --- Changes 5 Sep 2004 00:11:30 -0000 1.162 +++ Changes 5 Sep 2004 16:30:29 -0000 1.163 @@ -11,10 +11,10 @@ fix 'require blib' in scripts to also call 'blib->import', required to have an effect under perl 5.6.x. [Stas] -Make sure that when Apache-Test is a part of modperl-2.0 checkout, the -interactive configuration is properly run (it must not be run when -mod_perl 2.0 is tested since it should have all the info needed to run -the tests). [Stas] +don't allow running an explicit 'perl Makefile.PL', when Apache-Test +is checked out into the modperl-2.0 tree, since it then decides that +it's a part of the modperl-2.0 build and will try to use modperl +httpd/apxs arguments which could be unset or wrong [Stas] Fix skip test suite functionality in the interactive configuration phase [Stas] 1.21 +19 -1 httpd-test/perl-framework/Apache-Test/Makefile.PL Index: Makefile.PL =================================================================== RCS file: /home/cvs/httpd-test/perl-framework/Apache-Test/Makefile.PL,v retrieving revision 1.20 retrieving revision 1.21 diff -u -u -r1.20 -r1.21 --- Makefile.PL 6 Aug 2004 18:20:41 -0000 1.20 +++ Makefile.PL 5 Sep 2004 16:30:30 -0000 1.21 @@ -15,8 +15,13 @@ use Apache::TestMM qw(test clean); #enable 'make test and make clean' use Apache::TestRun; +use Apache::TestTrace; +use Apache::TestConfig (); my $VERSION; +set_version(); + +sanity_check(); Apache::TestMM::filter_args(); @@ -26,7 +31,6 @@ Apache::TestMM::generate_script($_); } -set_version(); # if built with mod_perl 2.0, its top-level Makefile.PL already # installs the uninstall code @@ -60,6 +64,20 @@ } close $fh; +} + +sub sanity_check { + # don't allow running an explicit 'perl Makefile.PL', when + # Apache-Test is checked out into the modperl-2.0 tree, since + # it then decides that it's a part of the modperl-2.0 build and + # will try to use modperl httpd/apxs arguments which could be + # unset or wrong + if (TOP_LEVEL && -e "../lib/mod_perl.pm") { + error "Do not run 'perl Makefile.PL' when Apache-Test is a " . + "subdirectory of modperl-2.0. Copy it elsewhere and run " . + "from there."; + Apache::TestRun::exit_perl(0); + } } sub MY::postamble { 1.244 +3 -4 httpd-test/perl-framework/Apache-Test/lib/Apache/TestConfig.pm Index: TestConfig.pm =================================================================== RCS file: /home/cvs/httpd-test/perl-framework/Apache-Test/lib/Apache/TestConfig.pm,v retrieving revision 1.243 retrieving revision 1.244 diff -u -u -r1.243 -r1.244 --- TestConfig.pm 27 Aug 2004 01:03:55 -0000 1.243 +++ TestConfig.pm 5 Sep 2004 16:30:30 -0000 1.244 @@ -30,12 +30,11 @@ use constant IS_MOD_PERL_2 => eval { require mod_perl && $mod_perl::VERSION >= 1.99 } || 0; +use constant IS_MOD_PERL_2_BUILD => IS_MOD_PERL_2 && + require Apache::Build && Apache::Build::IS_MOD_PERL_BUILD(); + use constant IS_APACHE_TEST_BUILD => grep { -e "$_/lib/Apache/TestConfig.pm" } qw(Apache-Test . ..); - -use constant IS_MOD_PERL_2_BUILD => - IS_MOD_PERL_2 && !IS_APACHE_TEST_BUILD && - require Apache::Build && Apache::Build::IS_MOD_PERL_BUILD(); use constant CUSTOM_CONFIG_FILE => 'Apache/TestConfigData.pm';