httpd-apreq-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Randy Kobes <ra...@theoryx5.uwinnipeg.ca>
Subject [apreq-2] perl's t/TEST.PL on Win32
Date Thu, 12 Jun 2003 04:35:56 GMT
On Win32, the t/TEST.PL in the perl glue gets the
base directory from cwd in a way that doesn't work
on Win32, due to the base string "httpd-apreq-2"
getting compared to a directory name that has been
shortened to a Win32 short path name. As well, the directory
for mod_apreq is different for Win32. This diff:
===========================================================
Index: TEST.PL
===================================================================
RCS file: /home/cvs/httpd-apreq-2/glue/perl/t/TEST.PL,v
retrieving revision 1.1
diff -u -r1.1 TEST.PL
--- TEST.PL	9 Jun 2003 04:00:45 -0000	1.1
+++ TEST.PL	12 Jun 2003 04:32:25 -0000
@@ -4,11 +4,17 @@
 use warnings FATAL => 'all';

 use lib qw(lib Apache-Test/lib);
+use Apache::Build;
+require Win32 if Apache::Build::WIN32;

 use Cwd;
-cwd =~ m{^(.+httpd-apreq-2)} or die "Can't find base cvs directory";
+my $cwd = Apache::Build::WIN32 ?
+    Win32::GetLongPathName(cwd) : cwd;
+$cwd =~ m{^(.+httpd-apreq-2)} or die "Can't find base cvs directory";
 my $base_dir = $1;
 my $env_dir = "$base_dir/env";
+my $env_dir_libs = Apache::Build::WIN32 ?
+    "$base_dir/win32/libs" : "$env_dir/.libs";

 use base 'Apache::TestRunPerl';

@@ -18,6 +24,6 @@
     my $self = shift;
     my $cfg = $self->{test_config};
     $cfg->preamble(IfModule => '!mod_apreq.c',
-               qq(LoadModule apreq_module "$env_dir/.libs/mod_apreq.so"\n));
+               qq(LoadModule apreq_module "$env_dir_libs/mod_apreq.so"\n));
     $self->SUPER::configure_modperl();
 }
=====================================================================
addresses those issues.

-- 
best regards,
randy

Mime
View raw message