perl-test-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jor...@apache.org
Subject svn commit: r357718 - in /perl/Apache-Test/trunk/lib/Apache: TestConfig.pm TestRun.pm TestServer.pm
Date Mon, 19 Dec 2005 16:20:42 GMT
Author: jorton
Date: Mon Dec 19 08:20:37 2005
New Revision: 357718

URL: http://svn.apache.org/viewcvs?rev=357718&view=rev
Log:
- allow user-specified pidfile location; useful if testing
with SELinux since the pidfile has different access control
requirements to log files so must be in a different location

Modified:
    perl/Apache-Test/trunk/lib/Apache/TestConfig.pm
    perl/Apache-Test/trunk/lib/Apache/TestRun.pm
    perl/Apache-Test/trunk/lib/Apache/TestServer.pm

Modified: perl/Apache-Test/trunk/lib/Apache/TestConfig.pm
URL: http://svn.apache.org/viewcvs/perl/Apache-Test/trunk/lib/Apache/TestConfig.pm?rev=357718&r1=357717&r2=357718&view=diff
==============================================================================
--- perl/Apache-Test/trunk/lib/Apache/TestConfig.pm (original)
+++ perl/Apache-Test/trunk/lib/Apache/TestConfig.pm Mon Dec 19 08:20:37 2005
@@ -75,6 +75,7 @@
    t_dir           => 'the t/ test directory (default is $top_dir/t)',
    t_conf          => 'the conf/ test directory (default is $t_dir/conf)',
    t_logs          => 'the logs/ test directory (default is $t_dir/logs)',
+   t_pid_file      => 'location of the pid file (default is $t_logs/httpd.pid)',
    t_conf_file     => 'test httpd.conf file (default is $t_conf/httpd.conf)',
    src_dir         => 'source directory to look for mod_foos.so',
    serverroot      => 'ServerRoot (default is $t_dir)',
@@ -103,7 +104,7 @@
 );
 
 my %filepath_conf_opts = map { $_ => 1 }
-    qw(top_dir t_dir t_conf t_logs t_conf_file src_dir serverroot
+    qw(top_dir t_dir t_conf t_logs t_pid_file t_conf_file src_dir serverroot
        documentroot bindir sbindir httpd apxs httpd_conf httpd_conf_extra
        perlpod sslca libmodperl);
 
@@ -308,6 +309,7 @@
     $vars->{sslcaorg}     ||= 'asf';
     $vars->{t_logs}       ||= catfile $vars->{serverroot}, 'logs';
     $vars->{t_conf_file}  ||= catfile $vars->{t_conf},   'httpd.conf';
+    $vars->{t_pid_file}   ||= catfile $vars->{t_logs},   'httpd.pid';
 
     if (WINFU) {
         for (keys %$vars) {
@@ -2601,7 +2603,7 @@
 ServerRoot   "@ServerRoot@"
 DocumentRoot "@DocumentRoot@"
 
-PidFile     @t_logs@/httpd.pid
+PidFile     @t_pid_file@
 ErrorLog    @t_logs@/error_log
 LogLevel    debug
 

Modified: perl/Apache-Test/trunk/lib/Apache/TestRun.pm
URL: http://svn.apache.org/viewcvs/perl/Apache-Test/trunk/lib/Apache/TestRun.pm?rev=357718&r1=357717&r2=357718&view=diff
==============================================================================
--- perl/Apache-Test/trunk/lib/Apache/TestRun.pm (original)
+++ perl/Apache-Test/trunk/lib/Apache/TestRun.pm Mon Dec 19 08:20:37 2005
@@ -535,9 +535,8 @@
         }
         else {
             warning "server $self->{server}->{name} is not running";
-            # cleanup a stale httpd.pid file if found
-            my $t_logs  = $self->{test_config}->{vars}->{t_logs};
-            my $pid_file = catfile $t_logs, "httpd.pid";
+            # cleanup a stale pid file if found
+            my $pid_file  = $self->{test_config}->{vars}->{t_pid_file};
             unlink $pid_file if -e $pid_file;
         }
         exit_perl $ok;

Modified: perl/Apache-Test/trunk/lib/Apache/TestServer.pm
URL: http://svn.apache.org/viewcvs/perl/Apache-Test/trunk/lib/Apache/TestServer.pm?rev=357718&r1=357717&r2=357718&view=diff
==============================================================================
--- perl/Apache-Test/trunk/lib/Apache/TestServer.pm (original)
+++ perl/Apache-Test/trunk/lib/Apache/TestServer.pm Mon Dec 19 08:20:37 2005
@@ -118,7 +118,7 @@
 
 sub pid_file {
     my $self = shift;
-    catfile $self->{config}->{vars}->{t_logs}, 'httpd.pid';
+    $self->{config}->{vars}->{t_pid_file};
 }
 
 sub dversion {



Mime
View raw message