httpd-test-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s...@apache.org
Subject cvs commit: httpd-test/perl-framework/Apache-Test Changes
Date Tue, 16 Mar 2004 03:10:32 GMT
stas        2004/03/15 19:10:32

  Modified:    perl-framework/Apache-Test/lib/Apache TestConfigPerl.pm
                        TestRunPerl.pm
               perl-framework/Apache-Test Changes
  Log:
  Apache::TestRunPerl now performs an early check whether it can load
  the right mod_perl environment.
  
  Revision  Changes    Path
  1.85      +0 -8      httpd-test/perl-framework/Apache-Test/lib/Apache/TestConfigPerl.pm
  
  Index: TestConfigPerl.pm
  ===================================================================
  RCS file: /home/cvs/httpd-test/perl-framework/Apache-Test/lib/Apache/TestConfigPerl.pm,v
  retrieving revision 1.84
  retrieving revision 1.85
  diff -u -u -r1.84 -r1.85
  --- TestConfigPerl.pm	4 Mar 2004 05:51:31 -0000	1.84
  +++ TestConfigPerl.pm	16 Mar 2004 03:10:32 -0000	1.85
  @@ -480,14 +480,6 @@
   sub configure_pm_tests {
       my $self = shift;
   
  -    # since server wasn't started yet, the modules in blib under
  -    # Apache2 can't be seen. So we must load Apache2.pm, without which
  -    # run_apache_test_config might fail to require modules
  -    require mod_perl;
  -    if ($mod_perl::VERSION > 1.99) {
  -        require Apache2;
  -    }
  -
       my @entries = ();
       $self->configure_pm_tests_pick(\@entries);
       $self->configure_pm_tests_sort(\@entries);
  
  
  
  1.16      +40 -0     httpd-test/perl-framework/Apache-Test/lib/Apache/TestRunPerl.pm
  
  Index: TestRunPerl.pm
  ===================================================================
  RCS file: /home/cvs/httpd-test/perl-framework/Apache-Test/lib/Apache/TestRunPerl.pm,v
  retrieving revision 1.15
  retrieving revision 1.16
  diff -u -u -r1.15 -r1.16
  --- TestRunPerl.pm	4 Mar 2004 05:51:31 -0000	1.15
  +++ TestRunPerl.pm	16 Mar 2004 03:10:32 -0000	1.16
  @@ -19,6 +19,7 @@
   
   use Apache::TestRun ();
   use Apache::TestConfigParse ();
  +use Apache::TestTrace;
   
   use File::Spec::Functions qw(catfile);
   
  @@ -38,6 +39,27 @@
   
       my $test_config = $self->{test_config};
   
  +    my $rev = $test_config->server->{rev};
  +    my $ver = $test_config->server->{version};
  +
  +    # sanity checking and loading the right mod_perl version
  +    if ($rev == 2) {
  +        eval { require Apache2 && require mod_perl };
  +    } else {
  +        eval { require mod_perl };
  +    }
  +    if ($@) {
  +        error "You are using mod_perl response handlers ",
  +            "but do not have a mod_perl capable Apache.";
  +        Apache::TestRun::exit_perl(0);
  +    }
  +    if (($rev == 1 and $mod_perl::VERSION >= 1.99) ||
  +        ($rev == 2 and $mod_perl::VERSION < 1.99)) {
  +        error "Found mod_perl/$mod_perl::VERSION, " .
  +            "but it can't be used with Apache/$ver";
  +        Apache::TestRun::exit_perl(0);
  +    }
  +
       $test_config->preamble_register(qw(configure_libmodperl));
   
       $test_config->postamble_register(qw(configure_inc
  @@ -64,3 +86,21 @@
   }
   
   1;
  +__END__
  +
  +=head1 NAME
  +
  +Apache::TestRunPerl - Run mod_perl-requiring Test Suite
  +
  +=head1 SYNOPSIS
  +
  +  use Apache::TestRunPerl;
  +  Apache::TestRunPerl->new->run(@ARGV);
  +
  +=head1 DESCRIPTION
  +
  +The C<Apache::TestRunPerl> package controls the configuration and
  +running of the test suite. It's a subclass of C<Apache::TestRun>, and
  +should be used only when you need to run mod_perl tests.
  +
  +=cut
  
  
  
  1.112     +4 -0      httpd-test/perl-framework/Apache-Test/Changes
  
  Index: Changes
  ===================================================================
  RCS file: /home/cvs/httpd-test/perl-framework/Apache-Test/Changes,v
  retrieving revision 1.111
  retrieving revision 1.112
  diff -u -u -r1.111 -r1.112
  --- Changes	11 Mar 2004 23:20:10 -0000	1.111
  +++ Changes	16 Mar 2004 03:10:32 -0000	1.112
  @@ -8,6 +8,10 @@
   
   =item 1.10-dev
   
  +Apache::TestRunPerl now performs an early check whether it can load
  +the right mod_perl environment. [William McKee <william@knowmad.com>,
  +Stas]
  +
   $ENV{APACHE_TEST_NO_STICKY_PREFERENCES}, if true, will both suppress
   generation of persistent preferences and ignore any that already exist.
   [Geoffrey Young]
  
  
  

Mime
View raw message