On Sun, 11 Jan 2004, Stas Bekman wrote:

> Randy Kobes wrote:
[ ... ]
> > my Apache is D:\Apache2\bin\Apache.exe, which would
> > get reported as d:\apache2\bin\apache.exe. If there isn't
> > an easy way to preserve the case yet still remove such
> > duplicates, I'll do that - it's not a big deal.
>
> Randy, you are the expert on win32 ;) I have no idea what
> method to use to get a consistent case on case-insenstive
> file systems. Really I think it's time to extend
> File::Spec to handle that and not solve this problem every
> time we need to read a filename.

This is an annoyance, for sure ... However, in a sense we
(Apache-Test) have some control over this problem. In
another section we're looking for 'Apache', and then in
TestRun.pm we also look for 'apache'. So both get reported
as being present. However, on Win32, looking for 'apache' is
somewhat misleading, as the default installation (either
binary or source) results in 'Apache'.  What about the
following:
============================================================
Index: lib/Apache/TestRun.pm
===================================================================
RCS file: 
/home/cvs/httpd-test/perl-framework/Apache-Test/lib/Apache/TestRun.pm,v
retrieving revision 1.138
diff -u -r1.138 TestRun.pm
--- lib/Apache/TestRun.pm       11 Jan 2004 15:25:12 -0000      1.138
+++ lib/Apache/TestRun.pm       13 Jan 2004 14:36:41 -0000
@@ -1343,11 +1343,13 @@

     {
         my %choices = ();
+        my @tries = Apache::TestConfig::WIN32 ?
+            qw(Apache httpd Apache2 httpd2) :
+                qw(apache httpd apache2 httpd2);
         for (grep defined $_,
              map({ catfile $vars->{$_}, $vars->{target} } qw(sbindir bindir)),
              $test_config->default_httpd, which($vars->{target}),
-             $ENV{APACHE},  which('apache'),  which('httpd'),
-             $ENV{APACHE2}, which('apache2'), which('httpd2')) {
+             $ENV{APACHE},  $ENV{APACHE2}, map {which($_)} @tries) {
             $choices{$_}++ if -e $_ && -x _;
         }
         my $optional = 0;
========================================================================

-- 
best regards,
randy

Reply via email to