You are viewing a plain text version of this content. The canonical link for it is here.
Posted to test-cvs@httpd.apache.org by ge...@apache.org on 2003/12/15 15:08:08 UTC

cvs commit: httpd-test/perl-framework/Apache-Test/lib/Apache TestConfigC.pm

geoff       2003/12/15 06:08:08

  Modified:    perl-framework/Apache-Test/lib/Apache TestConfigC.pm
  Log:
  allow conditional C module compilation on a more granular level.
  #define HTTPD_TEST_REQUIRE_APACHE 2.0.49 is now recognized.
  
  Revision  Changes    Path
  1.23      +14 -1     httpd-test/perl-framework/Apache-Test/lib/Apache/TestConfigC.pm
  
  Index: TestConfigC.pm
  ===================================================================
  RCS file: /home/cvs/httpd-test/perl-framework/Apache-Test/lib/Apache/TestConfigC.pm,v
  retrieving revision 1.22
  retrieving revision 1.23
  diff -u -r1.22 -r1.23
  --- TestConfigC.pm	7 Nov 2003 22:04:48 -0000	1.22
  +++ TestConfigC.pm	15 Dec 2003 14:08:08 -0000	1.23
  @@ -26,9 +26,22 @@
       my $fh = Symbol::gensym();
       open $fh, $file or die "open $file: $!";
       my $v = <$fh>;
  -    if ($v =~ /^\#define\s+HTTPD_TEST_REQUIRE_APACHE\s+(\d+)/) {
  +    if ($v =~ /^\#define\s+HTTPD_TEST_REQUIRE_APACHE\s+(\d+)\s*$/) {
  +        #define HTTPD_TEST_REQUIRE_APACHE 1
           unless ($self->{server}->{rev} == $1) {
               my $reason = "requires Apache version $1";
  +            $self->{cmodules_disabled}->{$mod} = $reason;
  +            notice "$mod $reason, skipping.";
  +            return;
  +        }
  +    }
  +    elsif ($v =~ /^\#define\s+HTTPD_TEST_REQUIRE_APACHE\s+(\d\.\d+(\.\d+)?)/) {
  +        #define HTTPD_TEST_REQUIRE_APACHE 2.1
  +        my $wanted = $1;
  +        (my $current) = $self->{server}->{version} =~ m:^Apache/(\d\.\d+\.\d+):;
  +
  +        if ($current lt $wanted) {
  +            my $reason = "requires Apache version $wanted";
               $self->{cmodules_disabled}->{$mod} = $reason;
               notice "$mod $reason, skipping.";
               return;