If I remember correctly there were too many problems with that approach. And if that's the case. We may need to first install httpd, then test modperl and then install modperl. If there are no problems, then modperl's make install should install httpd as well, as it did in mp1 (plus note my question above regarding the flexible build).


So mod_perl's make test (or make) should install httpd then ?


let's try first if we can test w/o installing.


Well, I just managed to run most tests w/o installing against the httpd
in the srcdir ;-)

How bad were the failures? Is it going to be too much of hassle to support that?


If we go with 'make test' against the source, then it's easy - we know the location of the source dir and we know the relative location of httpd executable. So just set -httpd /path/to/httpd from Makefile.PL, before creating t/TEST. Actually I think that we already handle that case internally (at least we did when we tried to make 'make test' work against the source).


Yes, that's what I thought, but I couldn't find where that magic is hapenning.
Care to point out to me, as it was the solution I wanted to try. I did it
manually just now and it does work and most test passe fine.


It's the filter_args sub that does the magic. So you do:

  @ARGV, qw(-httpd /path/to/httpd);
  Apache::TestMM::filter_args();

before calling

ModPerl::TestRun->generate_script;

or you can populate:

@Apache::TestMM::Argv = qw(-httpd /path/to/httpd);

instead of calling filter_args.


I just tried that and the problem is messier. The Makefile uses PASSENV
and always ends up invoking t/TEST as

APACHE_TEST_GROUP= APACHE_TEST_HTTPD= APACHE_TEST_PORT= APACHE_TEST_USER=
APACHE_TEST_APXS= perl t/TEST

and the environment vars seems to have precedence over whatever is in t/TEST
so the test still fails.

Running ./t/TEST manually does work now though ;-)

Something is wrong then. I've explicitly coded it to ignore any env vars if they are empty, precisely for this purpose. There must be a bug then. Look at Test.run:


sub custom_config_add_conf_opts {
    my $args = shift;
...

    for (@data_vars_opt) {
        next unless $Apache::TestConfigData::vars->{$_};
        # env vars override custom config
        my $env_value = $ENV{ $vars_to_env{$_} };
        next unless defined $env_value and length $env_value;
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        $args->{$_} ||= $Apache::TestConfigData::vars->{$_};
    }
}


If we go with 'make test' against the post-install httpd, then we have no idea what's the location, besides snooping on some httpd config files or using apxs if available. i.e. apachectl knows where httpd is located, so we should look at how apachectl finds it out and do the same.



And unless I am wrong, there should be an apxs in the build directory that knows
about httpd's to-be installed PREFIX


But apxs doesn't work for static builds, does it? At least it doesn't in apache1.3. I haven't tried in apache2.



+ if ($build->do_httpd) {


can this be $build->should_configure_httpd?


It can very well be anything you want ;-)


perfect :)


Actually, how about should_build_httpd ?

That's fine.



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

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to