Loading tests/httpserver.pl +29 −21 Original line number Diff line number Diff line Loading @@ -80,6 +80,14 @@ for ( $waitedpid = 0; } } if($path =~ /verifiedserver/) { # this is a hard-coded query-string for the test script # to verify that this is the server actually running! print "HTTP/1.1 999 WE ROOLZ\r\n"; exit; } else { # # we always start the path with a number, this is the # test number that this server will use to know what Loading @@ -104,7 +112,7 @@ for ( $waitedpid = 0; print $_; } close(DATA); } # print "Hello there, $name, it's now ", scalar localtime, "\r\n"; }; } Loading tests/runtests.sh +13 −0 Original line number Diff line number Diff line Loading @@ -31,6 +31,7 @@ stopserver() { if [ -f $PIDFILE ] ; then PID=`cat $PIDFILE` kill -9 $PID rm -f $PIDFILE # server is killed fi } Loading @@ -55,6 +56,18 @@ runserver () { sleep 1 # give it a little time to start else echo $STATUS # verify that our server is one one running on this port: data=`$CURL --silent -i $HOSTIP:$HOSTPORT/verifiedserver`; if { echo $data | grep -v "WE ROOLZ" >/dev/null 2>&1; } then echo "Another HTTP server is running on port $HOSTPORT" echo "Edit runtests.sh to use another port and rerun the test script" exit fi echo "The running HTTP server has been verified to be our test server" fi } Loading Loading
tests/httpserver.pl +29 −21 Original line number Diff line number Diff line Loading @@ -80,6 +80,14 @@ for ( $waitedpid = 0; } } if($path =~ /verifiedserver/) { # this is a hard-coded query-string for the test script # to verify that this is the server actually running! print "HTTP/1.1 999 WE ROOLZ\r\n"; exit; } else { # # we always start the path with a number, this is the # test number that this server will use to know what Loading @@ -104,7 +112,7 @@ for ( $waitedpid = 0; print $_; } close(DATA); } # print "Hello there, $name, it's now ", scalar localtime, "\r\n"; }; } Loading
tests/runtests.sh +13 −0 Original line number Diff line number Diff line Loading @@ -31,6 +31,7 @@ stopserver() { if [ -f $PIDFILE ] ; then PID=`cat $PIDFILE` kill -9 $PID rm -f $PIDFILE # server is killed fi } Loading @@ -55,6 +56,18 @@ runserver () { sleep 1 # give it a little time to start else echo $STATUS # verify that our server is one one running on this port: data=`$CURL --silent -i $HOSTIP:$HOSTPORT/verifiedserver`; if { echo $data | grep -v "WE ROOLZ" >/dev/null 2>&1; } then echo "Another HTTP server is running on port $HOSTPORT" echo "Edit runtests.sh to use another port and rerun the test script" exit fi echo "The running HTTP server has been verified to be our test server" fi } Loading