Reviewed by Tim Hatcher.
authordarin <darin@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 13 Mar 2006 20:00:54 +0000 (20:00 +0000)
committerdarin <darin@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 13 Mar 2006 20:00:54 +0000 (20:00 +0000)
        * Scripts/run-webkit-tests: Fix httpd handling to work on systems that
        have it named httpd-1.3 instead.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@13268 268f45cc-cd09-0410-ab3c-d52691b4dbfc

WebKitTools/ChangeLog
WebKitTools/Scripts/run-webkit-tests

index 6024d3daa96827583d7d131f0c2804c14c7254f9..af2e62128d0931d09b2e4c212a7ecf6042d52590 100644 (file)
@@ -1,3 +1,10 @@
+2006-03-13  Darin Adler  <darin@apple.com>
+
+        Reviewed by Tim Hatcher.
+
+        * Scripts/run-webkit-tests: Fix httpd handling to work on systems that
+        have it named httpd-1.3 instead.
+
 2006-03-13  Alexey Proskuryakov  <ap@nypop.com>
 
         Fix proposed by Mitz Pettel, reviewed by Darin.
index c0ec5654e9eb9b3abc236e7468e00a0ff09d6131..d3903ccbddb05e0a5a381161c4efe8083e0d1ff2 100755 (executable)
@@ -238,7 +238,25 @@ sub openHTTPDIfNeeded()
 
     mkpath $absTestResultsDirectory;
 
-    open2(\*HTTPDIN, \*HTTPDOUT, "/usr/sbin/httpd", 
+    my $httpdPath;
+    if (-x "/usr/sbin/httpd-1.3") {
+        $httpdPath = "/usr/sbin/httpd-1.3";
+        open CONFIG, $httpdConfig or die;
+        open CONFIGOUT, ">", "/tmp/WebKit/httpd.conf" or die;
+        while (<CONFIG>) {
+            s|/httpd/|/httpd-1.3/|g;
+            print CONFIGOUT;
+        }
+        close CONFIG;
+        close CONFIGOUT;
+        $httpdConfig = "/tmp/WebKit/httpd.conf";
+    } elsif (-x "/usr/sbin/httpd") {
+        $httpdPath = "/usr/sbin/httpd";
+    } else {
+        die "Can't locate the httpd binary";
+    }
+
+    open2(\*HTTPDIN, \*HTTPDOUT, $httpdPath, 
         "-f", "$httpdConfig",
         "-C", "DocumentRoot \"$documentRoot\"",
         "-C", "Listen $listen",