summaryrefslogtreecommitdiff
path: root/tests/run-tests.pl
diff options
context:
space:
mode:
authorJan Kneschke <jan@kneschke.de>2005-02-28 09:32:05 +0000
committerJan Kneschke <jan@kneschke.de>2005-02-28 09:32:05 +0000
commit33550d22ff9954419408d03e4b7a986e446bfc92 (patch)
tree9483265609f7981b9eb52c6b96a996a5e003e36d /tests/run-tests.pl
parent8b248ce3a5a06869b0501ff6f7ba95193b6301cc (diff)
downloadlighttpd-git-33550d22ff9954419408d03e4b7a986e446bfc92.tar.gz
get pidof working on linux
git-svn-id: svn://svn.lighttpd.net/lighttpd/trunk@51 152afb58-edef-0310-8abb-c4023f1b3aa9
Diffstat (limited to 'tests/run-tests.pl')
-rwxr-xr-xtests/run-tests.pl11
1 files changed, 5 insertions, 6 deletions
diff --git a/tests/run-tests.pl b/tests/run-tests.pl
index 23dbf255..742edb42 100755
--- a/tests/run-tests.pl
+++ b/tests/run-tests.pl
@@ -2,7 +2,7 @@
use strict;
use IO::Socket;
-use Test::More tests => 87;
+use Test::More tests => 89;
my $testname;
@@ -16,11 +16,10 @@ my $pidoffile = '/tmp/lighttpd/pidof.pid';
sub pidof {
my $prog = $_[0];
- system("ps ax | grep $prog | awk '{ print \$1 }' > $pidoffile") or
- system("ps -ef | grep $prog | awk '{ print \$1 }' > $pidoffile") or
+ open F, "ps ax | grep $prog | awk '{ print \$1 }'|" or
+ open F, "ps -ef | grep $prog | awk '{ print \$2 }'|" or
return -1;
- open F, $pidfile or return -1;
my $pid = <F>;
close F;
@@ -826,7 +825,7 @@ ok(handle_http == 0, 'NPH + perl, Bug #14');
print "\nmodules - mod_fastcgi\n";
SKIP: {
- skip "no PHP running on port 1026", 11 if pidof("php") == -1;
+ skip "no PHP running on port 1026", 13 if pidof("php") == -1;
@request = ( <<EOF
GET /phpinfo.php HTTP/1.0
@@ -905,7 +904,7 @@ GET /phphost.php HTTP/1.0
Host: zzz.example.org
EOF
);
- @response = ( { 'HTTP-Protocol' => 'HTTP/1.0', 'HTTP-Status' => 200, 'HTTP-Content' => 'zzz.example.org' } );
+ @response = ( { 'HTTP-Protocol' => 'HTTP/1.0', 'HTTP-Status' => 200, 'HTTP-Content' => 'www.example.org' } );
ok(handle_http == 0, 'SERVER_NAME');
@request = ( <<EOF