Changeset 51

Show
Ignore:
Timestamp:
02/28/2005 09:32:05 AM (4 years ago)
Author:
jan
Message:

get pidof working on linux

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/tests/run-tests.pl

    r42 r51  
    33use strict; 
    44use IO::Socket; 
    5 use Test::More tests => 87; 
     5use Test::More tests => 89; 
    66 
    77 
     
    1717        my $prog = $_[0]; 
    1818 
    19         system("ps ax  | grep $prog | awk '{ print \$1 }' > $pidoffile") or 
    20         system("ps -ef | grep $prog | awk '{ print \$1 }' > $pidoffile") or 
     19        open F, "ps ax  | grep $prog | awk '{ print \$1 }'|" or 
     20        open F, "ps -ef | grep $prog | awk '{ print \$2 }'|" or 
    2121          return -1; 
    2222 
    23         open F, $pidfile or return -1; 
    2423        my $pid = <F>; 
    2524        close F; 
     
    827826 
    828827SKIP: { 
    829         skip "no PHP running on port 1026", 11 if pidof("php") == -1;  
     828        skip "no PHP running on port 1026", 13 if pidof("php") == -1;  
    830829 
    831830        @request  = ( <<EOF 
     
    906905EOF 
    907906 ); 
    908         @response = ( { 'HTTP-Protocol' => 'HTTP/1.0', 'HTTP-Status' => 200, 'HTTP-Content' => 'zzz.example.org' } ); 
     907        @response = ( { 'HTTP-Protocol' => 'HTTP/1.0', 'HTTP-Status' => 200, 'HTTP-Content' => 'www.example.org' } ); 
    909908        ok(handle_http == 0, 'SERVER_NAME'); 
    910909