summaryrefslogtreecommitdiff
path: root/tests/LightyTest.pm
diff options
context:
space:
mode:
authorGlenn Strauss <gstrauss@gluelogic.com>2023-01-31 21:38:56 -0500
committerGlenn Strauss <gstrauss@gluelogic.com>2023-05-03 23:11:34 -0400
commit06050c7d996559ab22e0284dac993597a7b0ee67 (patch)
tree8b5258f69ab8796cab22626ca1fb8e13582bfc3a /tests/LightyTest.pm
parentb5a691b27af9d4b1b600c19f7fb0bfafd22f2bb2 (diff)
downloadlighttpd-git-06050c7d996559ab22e0284dac993597a7b0ee67.tar.gz
[tests] _WIN32 cygwin test support
Diffstat (limited to 'tests/LightyTest.pm')
-rw-r--r--tests/LightyTest.pm9
1 files changed, 8 insertions, 1 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 {