diff options
author | Daniel Stenberg <daniel@haxx.se> | 2000-11-13 11:45:41 +0000 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2000-11-13 11:45:41 +0000 |
commit | 1cc8af277989d01a9538cbbb75b3ddf6f9855aee (patch) | |
tree | 2eb416a5115997f553a4bec4073f97a64913c6aa /tests/runtests.sh | |
parent | bfb118e42ae0785de1106938d3566039e801b925 (diff) |
if the server is already running when the script is started, it now verifies
that it actually is our test server that runs
Diffstat (limited to 'tests/runtests.sh')
-rwxr-xr-x | tests/runtests.sh | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/tests/runtests.sh b/tests/runtests.sh index 53c04748a..dba912978 100755 --- a/tests/runtests.sh +++ b/tests/runtests.sh @@ -31,6 +31,7 @@ stopserver() { if [ -f $PIDFILE ] ; then PID=`cat $PIDFILE` kill -9 $PID + rm -f $PIDFILE # server is killed fi } @@ -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 } |