dougm 01/10/13 19:11:36
Modified: perl-framework/Apache-Test/lib/Apache TestConfig.pm
TestMM.pm TestServer.pm
Log:
changes for win32
Submitted by: Randy Kobes <[EMAIL PROTECTED]>
Reviewed by: dougm
Revision Changes Path
1.71 +1 -1
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.70
retrieving revision 1.71
diff -u -r1.70 -r1.71
--- TestConfig.pm 2001/10/07 05:03:32 1.70
+++ TestConfig.pm 2001/10/14 02:11:36 1.71
@@ -258,7 +258,7 @@
my $self = shift;
my $vars = $self->{vars};
- $vars->{target} ||= 'httpd';
+ $vars->{target} ||= (WIN32 ? 'Apache.exe' : 'httpd');
unless ($vars->{httpd}) {
#sbindir should be bin/ with the default layout
1.12 +1 -1
httpd-test/perl-framework/Apache-Test/lib/Apache/TestMM.pm
Index: TestMM.pm
===================================================================
RCS file:
/home/cvs/httpd-test/perl-framework/Apache-Test/lib/Apache/TestMM.pm,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -r1.11 -r1.12
--- TestMM.pm 2001/09/10 04:18:22 1.11
+++ TestMM.pm 2001/10/14 02:11:36 1.12
@@ -37,7 +37,7 @@
my $env = Apache::TestConfig->passenv_makestr();
- my $preamble = <<EOF;
+ my $preamble = Apache::TestConfig::WIN32 ? "" : <<EOF;
PASSENV = $env
EOF
1.34 +22 -1
httpd-test/perl-framework/Apache-Test/lib/Apache/TestServer.pm
Index: TestServer.pm
===================================================================
RCS file:
/home/cvs/httpd-test/perl-framework/Apache-Test/lib/Apache/TestServer.pm,v
retrieving revision 1.33
retrieving revision 1.34
diff -u -r1.33 -r1.34
--- TestServer.pm 2001/10/12 19:10:31 1.33
+++ TestServer.pm 2001/10/14 02:11:36 1.34
@@ -275,6 +275,13 @@
my $self = shift;
my $aborted = shift;
+ if (Apache::TestConfig::WIN32) {
+ if ($self->{config}->{win32obj}) {
+ $self->{config}->{win32obj}->Kill(-1);
+ return 1;
+ }
+ }
+
my $pid = 0;
my $tries = 3;
my $tried_kill = 0;
@@ -378,7 +385,21 @@
}
print "$cmd\n";
- system "$cmd &";
+
+ if (WIN32) {
+ require Win32::Process;
+ my $obj;
+ Win32::Process::Create($obj,
+ $httpd,
+ $cmd,
+ 0,
+ Win32::Process::NORMAL_PRIORITY_CLASS(),
+ '.') || die Win32::Process::ErrorReport();
+ $config->{win32obj} = $obj;
+ }
+ else {
+ system "$cmd &";
+ }
while ($old_pid and $old_pid == $self->pid) {
warning "old pid file ($old_pid) still exists\n";