From 33550d22ff9954419408d03e4b7a986e446bfc92 Mon Sep 17 00:00:00 2001 From: Jan Kneschke Date: Mon, 28 Feb 2005 09:32:05 +0000 Subject: get pidof working on linux git-svn-id: svn://svn.lighttpd.net/lighttpd/trunk@51 152afb58-edef-0310-8abb-c4023f1b3aa9 --- tests/run-tests.pl | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) (limited to 'tests/run-tests.pl') 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 = ; 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 = ( < '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 = ( <