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/lib/Apache TestConfig.pm TestRun.pm
Date Sun, 18 Jan 2004 08:34:29 GMT
stas        2004/01/18 00:34:29

  Modified:    perl-framework/Apache-Test Changes
               perl-framework/Apache-Test/lib/Apache TestConfig.pm
                        TestRun.pm
  Log:
  Special to Apache-Test environment variables:
  APXS APACHE APACHE_GROUP APACHE_USER APACHE_PORT
  are now moved to:
  APACHE_TEST_APXS APACHE_TEST_HTTPD APACHE_TEST_GROUP
  APACHE_TEST_USER APACHE_TEST_PORT
  respectively, for consistency with other APACHE_TEST_ env vars and in
  order not to interfere with other projects that may use the same env
  vars.
  
  Revision  Changes    Path
  1.82      +9 -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.81
  retrieving revision 1.82
  diff -u -u -r1.81 -r1.82
  --- Changes	18 Jan 2004 08:08:39 -0000	1.81
  +++ Changes	18 Jan 2004 08:34:29 -0000	1.82
  @@ -8,6 +8,15 @@
   
   =item 1.08_dev
   
  +Special to Apache-Test environment variables:
  +APXS APACHE APACHE_GROUP APACHE_USER APACHE_PORT
  +are now moved to:
  +APACHE_TEST_APXS APACHE_TEST_HTTPD APACHE_TEST_GROUP 
  +APACHE_TEST_USER APACHE_TEST_PORT
  +respectively, for consistency with other APACHE_TEST_ env vars and in
  +order not to interfere with other projects that may use the same env
  +vars. [Stas]
  +
   if $self->{reconfigure} is true, make sure to perform a complete
   reconfiguration, to solve the bug where conf.in files weren't reparsed
   and vhost hostport info was getting lost on subsequent runs when
  
  
  
  1.201     +12 -8     httpd-test/perl-framework/Apache-Test/lib/Apache/TestConfig.pm
  
  Index: TestConfig.pm
  ===================================================================
  RCS file: /home/cvs/httpd-test/perl-framework/Apache-Test/lib/Apache/TestConfig.pm,v
  retrieving revision 1.200
  retrieving revision 1.201
  diff -u -u -r1.200 -r1.201
  --- TestConfig.pm	18 Jan 2004 07:21:43 -0000	1.200
  +++ TestConfig.pm	18 Jan 2004 08:34:29 -0000	1.201
  @@ -105,7 +105,11 @@
   }
   
   my %passenv = map { $_,1 } qw{
  -APXS APACHE APACHE_GROUP APACHE_USER APACHE_PORT
  +    APACHE_TEST_APXS
  +    APACHE_TEST_HTTPD
  +    APACHE_TEST_GROUP
  +    APACHE_TEST_USER
  +    APACHE_TEST_PORT
   };
   
   sub passenv {
  @@ -464,7 +468,7 @@
       #use only first value if $) contains more than one
       $gid =~ s/^(\d+).*$/$1/;
   
  -    my $group = $ENV{APACHE_GROUP} || (getgrgid($gid) || "#$gid");
  +    my $group = $ENV{APACHE_TEST_GROUP} || (getgrgid($gid) || "#$gid");
   
       if ($group eq 'root') {
           # similar to default_user, we want to avoid perms problems,
  @@ -484,7 +488,7 @@
   
       my $uid = $>;
   
  -    my $user = $ENV{APACHE_USER} || (getpwuid($uid) || "#$uid");
  +    my $user = $ENV{APACHE_TEST_USER} || (getpwuid($uid) || "#$uid");
   
       if ($user eq 'root') {
           my $other = (getpwnam('nobody'))[0];
  @@ -514,7 +518,7 @@
           return $build_config->{MP_APXS};
       }
   
  -    $ENV{APXS};
  +    $ENV{APACHE_TEST_APXS};
   }
   
   sub default_httpd {
  @@ -529,7 +533,7 @@
           }
       }
   
  -    $ENV{APACHE};
  +    $ENV{APACHE_TEST_HTTPD};
   }
   
   my $localhost;
  @@ -560,10 +564,10 @@
   sub select_first_port {
       my $self = shift;
   
  -    my $port ||= $ENV{APACHE_PORT} || $self->{vars}{port} || DEFAULT_PORT;
  +    my $port ||= $ENV{APACHE_TEST_PORT} || $self->{vars}{port} || DEFAULT_PORT;
   
       # memoize
  -    $ENV{APACHE_PORT} = $port;
  +    $ENV{APACHE_TEST_PORT} = $port;
   
       return $port unless $port eq 'select';
   
  @@ -587,7 +591,7 @@
           unless $port == DEFAULT_PORT;
   
       # memoize
  -    $ENV{APACHE_PORT} = $port;
  +    $ENV{APACHE_TEST_PORT} = $port;
   
       return $port;
   }
  
  
  
  1.143     +21 -18    httpd-test/perl-framework/Apache-Test/lib/Apache/TestRun.pm
  
  Index: TestRun.pm
  ===================================================================
  RCS file: /home/cvs/httpd-test/perl-framework/Apache-Test/lib/Apache/TestRun.pm,v
  retrieving revision 1.142
  retrieving revision 1.143
  diff -u -u -r1.142 -r1.143
  --- TestRun.pm	18 Jan 2004 08:08:39 -0000	1.142
  +++ TestRun.pm	18 Jan 2004 08:34:29 -0000	1.143
  @@ -77,11 +77,11 @@
   my @data_vars_opt  = qw(user group port);
   # mapping from $Apache::TestConfigData::vars to $ENV settings
   my %vars_to_env = (
  -    httpd => 'APACHE',
  -    user  => 'APACHE_USER',
  -    group => 'APACHE_GROUP',
  -    apxs  => 'APXS',
  -    port  => 'APACHE_PORT',
  +    httpd => 'APACHE_TEST_HTTPD',
  +    apxs  => 'APACHE_TEST_APXS',
  +    user  => 'APACHE_TEST_USER',
  +    group => 'APACHE_TEST_GROUP',
  +    port  => 'APACHE_TEST_PORT',
   );
   
   sub fixup {
  @@ -1152,8 +1152,8 @@
       # situation where both are saved in custom config but only one
       # (let's say httpd) is overriden by the command line /env var and
       # a hell may break loose if we take that overriden httpd value and
  -    # also useapxs from custom config which could point to a different
  -    # server . So if there is an override of apxs or httpd, do not use
  +    # also use apxs from custom config which could point to a different
  +    # server. So if there is an override of apxs or httpd, do not use
       # the custom config for apxs or httpd.
       my $vars_must_overriden = grep {
           $ENV{ $vars_to_env{$_} } || $args->{$_}
  @@ -1428,9 +1428,9 @@
   
     % t/TEST -httpd /path/to/alternative/httpd
   
  -or via the environment variable APACHE. For example:
  +or via the environment variable APACHE_TEST_HTTPD. For example:
   
  -  % APACHE=/path/to/alternative/httpd t/TEST
  +  % APACHE_TEST_HTTPD=/path/to/alternative/httpd t/TEST
   
   ];
   
  @@ -1443,7 +1443,9 @@
           for (grep defined $_,
                map({ catfile $vars->{$_}, $vars->{target} } qw(sbindir bindir)),
                $test_config->default_httpd, which($vars->{target}),
  -             $ENV{APACHE}, $ENV{APACHE2}, map {which($_)} @tries) {
  +             $ENV{APACHE}, $ENV{APACHE2},
  +             $ENV{APACHE_TEST_HTTPD}, $ENV{APACHE_TEST_HTTPD2},
  +             map {which($_)} @tries) {
               $choices{$_}++ if -e $_ && -x _;
           }
           my $optional = 0;
  @@ -1468,9 +1470,9 @@
   
     % t/TEST -apxs /path/to/alternative/apxs
   
  -or via the environment variable APACHE. For example:
  +or via the environment variable APACHE_TEST_APXS. For example:
   
  -  % APXS=/path/to/alternative/apxs t/TEST
  +  % APACHE_TEST_APXS=/path/to/alternative/apxs t/TEST
   
   ];
       {
  @@ -1478,8 +1480,8 @@
           for (grep defined $_,
                map({ catfile $vars->{$_}, 'apxs' } qw(sbindir bindir)),
                $test_config->default_apxs,
  -             $ENV{APXS},  which('apxs'),
  -             $ENV{APXS2}, which('apxs2')) {
  +             $ENV{APXS},  $ENV{APACHE_TEST_APXS},  which('apxs'),
  +             $ENV{APXS2}, $ENV{APACHE_TEST_APXS2}, which('apxs2')) {
               $choices{$_}++ if -e $_ && -x _;
           }
           my $optional = 1;
  @@ -1648,10 +1650,11 @@
   to a configuration file C<Apache::TestConfigData>.  This information
   will then be used in setting these options for subsequent uses of
   C<Apache-Test> unless temprorarily overridden, either by setting the
  -appropriate environment variable (C<APACHE>, C<APXS>, C<APACHE_PORT>,
  -C<APACHE_USER>, and C<APACHE_GROUP>) or by giving the relevant option
  -(C<-httpd>, C<-apxs>, C<-port>, C<-user>, and C<-group>)
when the
  -C<TEST> script is run.
  +appropriate environment variable (C<APACHE_TEST_HTTPD>,
  +C<APACHE_TEST_APXS>, C<APACHE_TEST_PORT>, C<APACHE_TEST_USER>, and
  +C<APACHE_TEST_GROUP>) or by giving the relevant option (C<-httpd>,
  +C<-apxs>, C<-port>, C<-user>, and C<-group>) when the C<TEST>
script
  +is run.
   
   Finally it's possible to permanently override the previously saved
   options by passing C<L<-save|/Saving_Custom_Configuration_Options>>.
  
  
  

Mime
View raw message