diff options
Diffstat (limited to 'tests')
-rw-r--r-- | tests/LightyTest.pm | 9 | ||||
-rw-r--r-- | tests/condition.conf | 2 | ||||
-rwxr-xr-x | tests/docroot/cgi.pl | 7 | ||||
-rw-r--r-- | tests/fastcgi-responder.conf | 2 | ||||
-rw-r--r-- | tests/lighttpd.conf | 4 | ||||
-rw-r--r-- | tests/proxy.conf | 2 | ||||
-rw-r--r-- | tests/scgi-responder.conf | 2 |
7 files changed, 20 insertions, 8 deletions
diff --git a/tests/LightyTest.pm b/tests/LightyTest.pm index 5de3af91..f87ef4f3 100644 --- a/tests/LightyTest.pm +++ b/tests/LightyTest.pm @@ -207,7 +207,7 @@ sub cygpath_alm { my $result = <$FH>; close $FH; chomp $result; - $result =~ s/^[A-Z]://i; # remove volume (C:) + $result =~ s/^[A-Z]://i unless $_[1]; # remove volume (C:) return $result; } @@ -236,6 +236,11 @@ sub start_proc { $testdir = cygpath_alm($testdir); $conf = cygpath_alm($conf); $modules_path = cygpath_alm($modules_path); + + $ENV{CYGROOT} = cygpath_alm("/", 1); + $ENV{CYGVOL} = $ENV{CYGROOT} =~ m%^([a-z]):%i + ? "/cygdrive/$1" + : "/cygdrive/c"; } my @cmdline = ($self->{LIGHTTPD_PATH}, "-D", "-f", $conf, "-m", $modules_path); @@ -272,6 +277,8 @@ sub start_proc { server.systemd-socket-activation := "disable" server.bind = "127.0.0.1" server.port = $$self{'PORT'} +server.modules += ("mod_setenv") +setenv.set-environment += ("CYGROOT" => "$ENV{CYGROOT}") BIND_OVERRIDE } else { diff --git a/tests/condition.conf b/tests/condition.conf index aca6ce7f..ede322fe 100644 --- a/tests/condition.conf +++ b/tests/condition.conf @@ -12,7 +12,7 @@ server.name = "www.example.org" server.tag = "lighttpd-1.4.x" server.compat-module-load = "disable" -server.modules = ( +server.modules += ( "mod_redirect", "mod_accesslog", "mod_staticfile", diff --git a/tests/docroot/cgi.pl b/tests/docroot/cgi.pl index cb72f45a..2ff02e7b 100755 --- a/tests/docroot/cgi.pl +++ b/tests/docroot/cgi.pl @@ -28,12 +28,17 @@ if ($ENV{"QUERY_STRING"} eq "send404") { # X-Sendfile if ($ENV{"QUERY_STRING"} eq "xsendfile") { + # add path prefix if cygwin tests running for win32native executable + # (strip volume so path starts with '/'; works only on same volume) + my $prefix = $ENV{CYGROOT} || ""; + $prefix =~ s/^[a-z]://i; + # urlencode path for CGI header # (including urlencode ',' if in path, for X-Sendfile2 w/ FastCGI (not CGI)) # (This implementation is not minimal encoding; # encode everything that is not alphanumeric, '.' '_', '-', '/') require Cwd; - my $path = Cwd::getcwd() . "/index.txt"; + my $path = $prefix . Cwd::getcwd() . "/index.txt"; $path =~ s#([^\w./-])#"%".unpack("H2",$1)#eg; print "Status: 200\r\n"; diff --git a/tests/fastcgi-responder.conf b/tests/fastcgi-responder.conf index b0d5ce8d..8f509369 100644 --- a/tests/fastcgi-responder.conf +++ b/tests/fastcgi-responder.conf @@ -12,7 +12,7 @@ server.breakagelog = env.SRCDIR + "/tmp/lighttpd/logs/lighttpd.breakage. server.name = "www.example.org" server.compat-module-load = "disable" -server.modules = ( +server.modules += ( "mod_auth", "mod_authn_file", "mod_fastcgi", diff --git a/tests/lighttpd.conf b/tests/lighttpd.conf index d186dc82..95b3a0b0 100644 --- a/tests/lighttpd.conf +++ b/tests/lighttpd.conf @@ -20,7 +20,7 @@ server.feature-flags += ( "auth.delay-invalid-creds" => "disable" ) server.dir-listing = "enable" -server.modules = ( +server.modules += ( "mod_extforward", "mod_auth", "mod_authn_file", @@ -62,7 +62,7 @@ setenv.add-environment = ( "TRAC_ENV" => "tracenv", "SETENV" => "setenv", ) -setenv.set-environment = ( +setenv.set-environment += ( "NEWENV" => "newenv", "BLANK_VALUE" => "", ) diff --git a/tests/proxy.conf b/tests/proxy.conf index 365693ab..c4f9df21 100644 --- a/tests/proxy.conf +++ b/tests/proxy.conf @@ -9,7 +9,7 @@ server.name = "www.example.org" server.tag = "Proxy" server.compat-module-load = "disable" -server.modules = ( +server.modules += ( "mod_proxy", "mod_accesslog", ) diff --git a/tests/scgi-responder.conf b/tests/scgi-responder.conf index 15726b38..8be8e2b5 100644 --- a/tests/scgi-responder.conf +++ b/tests/scgi-responder.conf @@ -12,7 +12,7 @@ server.breakagelog = env.SRCDIR + "/tmp/lighttpd/logs/lighttpd.breakage. server.name = "www.example.org" server.compat-module-load = "disable" -server.modules = ( +server.modules += ( "mod_scgi", "mod_accesslog", ) |