--- embedaddon/lighttpd/tests/mod-fastcgi.t 2013/10/14 10:32:47 1.1 +++ embedaddon/lighttpd/tests/mod-fastcgi.t 2016/11/02 10:35:00 1.1.1.2 @@ -15,13 +15,10 @@ my $tf = LightyTest->new(); my $t; my $php_child = -1; -my $phpbin = (defined $ENV{'PHP'} ? $ENV{'PHP'} : '/usr/bin/php-cgi'); -$ENV{'PHP'} = $phpbin; - SKIP: { skip "PHP already running on port 1026", 1 if $tf->listening_on(1026); - skip "no php binary found", 1 unless -x $phpbin; - ok(-1 != ($php_child = $tf->spawnfcgi($phpbin, 1026)), "Spawning php"); + skip "no php binary found", 1 unless $LightyTest::HAVE_PHP; + ok(-1 != ($php_child = $tf->spawnfcgi($ENV{'PHP'}, 1026)), "Spawning php"); } SKIP: { @@ -132,12 +129,16 @@ EOF $t->{RESPONSE} = [ { 'HTTP-Protocol' => 'HTTP/1.0', 'HTTP-Status' => 200 } ]; ok($tf->handle_http($t) == 0, 'PATHINFO'); + if ($^O ne "cygwin") { $t->{REQUEST} = ( <{RESPONSE} = [ { 'HTTP-Protocol' => 'HTTP/1.0', 'HTTP-Status' => 404 } ]; ok($tf->handle_http($t) == 0, 'No source retrieval'); + } else { + ok(1, 'No source retrieval; skipped on cygwin; see response.c'); + } $t->{REQUEST} = ( <{CONFIGFILE} = 'fastcgi-13.conf'; ok($tf->start_proc == 0, "Starting lighttpd with $tf->{CONFIGFILE}") or die(); $t->{REQUEST} = ( <