httpd-apreq-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From j...@apache.org
Subject cvs commit: httpd-apreq-2/glue/perl/t TEST.PL
Date Sun, 20 Jul 2003 08:52:19 GMT
joes        2003/07/20 01:52:19

  Modified:    env/t    TEST.PL
               glue/perl/t TEST.PL
  Log:
  TEST.PL fixes to avoid using prior installations of libapreq et. al.
  
  Revision  Changes    Path
  1.3       +6 -0      httpd-apreq-2/env/t/TEST.PL
  
  Index: TEST.PL
  ===================================================================
  RCS file: /home/cvs/httpd-apreq-2/env/t/TEST.PL,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- TEST.PL	30 Jun 2003 20:42:14 -0000	1.2
  +++ TEST.PL	20 Jul 2003 08:52:19 -0000	1.3
  @@ -18,6 +18,12 @@
   $Apache::TestTrace::Level = 'debug';
   main::->new->run(@ARGV);
   
  +sub pre_configure {
  +    my $self = shift;
  +    # Don't load an installed mod_apreq
  +    Apache::TestConfig::autoconfig_skip_module_add('mod_apreq.c');
  +}
  +
   sub configure {
       my $self = shift;
       my $cfg = $self->{test_config};
  
  
  
  1.4       +46 -1     httpd-apreq-2/glue/perl/t/TEST.PL
  
  Index: TEST.PL
  ===================================================================
  RCS file: /home/cvs/httpd-apreq-2/glue/perl/t/TEST.PL,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- TEST.PL	13 Jun 2003 09:46:52 -0000	1.3
  +++ TEST.PL	20 Jul 2003 08:52:19 -0000	1.4
  @@ -22,10 +22,55 @@
   
   main::->new->run(@ARGV);
   
  +sub pre_configure {
  +    my $self = shift;
  +    # Don't load an installed mod_apreq
  +    Apache::TestConfig::autoconfig_skip_module_add('mod_apreq.c');
  +}
  +
  +
   sub configure_modperl {
       my $self = shift;
  -    my $cfg = $self->{test_config};
  +    bless my $cfg = $self->{test_config}, "My::TestConfig";
       $cfg->preamble(IfModule => '!mod_apreq.c',
                  qq(LoadModule apreq_module "$env_dir_libs/mod_apreq.so"\n));
       $self->SUPER::configure_modperl();
   }
  +
  +
  +package My::TestConfig;
  +use base 'Apache::TestConfig';
  +use File::Spec::Functions qw(catfile);
  +sub configure_startup_pl {
  +    my $self = shift;
  +
  +    #for 2.0 we could just use PerlSwitches -Mlib=...
  +    #but this will work for both 2.0 and 1.xx
  +    if (my $inc = $self->{inc}) {
  +        my $include_pl = catfile $self->{vars}->{t_conf}, 'modperl_inc.pl';
  +        my $fh = $self->genfile($include_pl);
  +        # make sure that the dev libs come before blib
  +        my $fixup = Apache::TestConfig->modperl_2_inc_fixup();
  +        print $fh $fixup;
  +        for (reverse @$inc) {
  +            print $fh "use lib '$_';\n";
  +        }
  +        print $fh "1;\n";
  +    }
  +
  +    if ($self->server->{rev} >= 2) {
  +        $self->postamble(PerlSwitches => "-Mlib=$self->{vars}->{serverroot}");
  +    }
  +
  +    my $startup_pl = catfile $self->{vars}->{t_conf}, 'modperl_startup.pl';
  +
  +
  +    unless (-e $startup_pl) {
  +        my $fh = $self->genfile($startup_pl);
  +        print $fh $self->startup_pl_code;
  +        close $fh;
  +    }
  +
  +    $self->postamble(PerlRequire => $startup_pl);
  +}
  +
  
  
  

Mime
View raw message