Gavin Carr wrote: > On Fri, Jan 21, 2005 at 09:26:53AM -0500, Geoffrey Young wrote: > >>>I'm trying to test a C module against both apache2 and apache1. apache1 >>>is working beautifully, but when I attempt to reconfigure for apache2 >>>(stock FC1), A::T (1.20) keeps complaining about finding mod_perl 1. I'm >>>doing: >>> >>> ./TEST -clean >>> ./TEST -apxs /usr/sbin/apxs -conf >> >>when I run tests against both apache 1 and apache 2 I generally 'make >>realclean' and then re- "perl Makefile.PL -apxs..." and it works just fine. >> >>if you look in t/TEST you'll probably see your old -apxs path in there. >> >>well, that is, if you specified -apxs when building your Makefile :) > > > Since this is a C module I'm actually just using a static TEST like this: > > #!/usr/bin/perl > use strict; > use warnings FATAL => 'all'; > use Apache::TestRunPerl; > Apache::TestRunPerl->new->run(@ARGV);
since it's just a C module and you don't need mod_perl you should change that Apache::TestRunPerl to just Apache::TestRun. that should make A-T use the inherited mod_perl from httpd.conf instead of hunting around for it. > > straight out of one of the A::T tutorials. you should check out the code from the tutorial I gave at ApacheCon. the code is here http://www.modperlcookbook.org/~geoff/slides/ApacheCon/2004/test-driven-development-code.tar.gz and the tutorial slides are here http://www.modperlcookbook.org/~geoff/slides/ApacheCon/2004/test-driven-development.pdf pay particular attention to mod_example_ipc-install in the code tarball. basically, put your C module in c-modules following the pattern you'll see there (filenames and directory names and declarations are important). then let Perl manage t/TEST and the Makefile for you using makefile. > No change with APACHE_TEST_NO_STICKY_PREFERENCES=1, and I don't have a > ~/.apache-test at all. Nothing actually ends up in t/conf after the -conf > run either - it looks like it's just bailing out. hmm, that's odd. > > Any further suggestions of where to look? Might be perl debugger time ... I would start with copying the workflow I outline in the tarball I mentioned above. it's a bit different than what you're doing now, so it may feel strange, but give it a whirl and see if it works. then you can decide if you like it or not :) HTH --Geoff
