Author: fw
Date: 2009-10-11 12:05:22 +0000 (Sun, 11 Oct 2009)
New Revision: 12986

Modified:
   bin/test-web-server
Log:
bin/test-web-server: switch to HTTP invocation


Modified: bin/test-web-server
===================================================================
--- bin/test-web-server 2009-10-11 12:04:15 UTC (rev 12985)
+++ bin/test-web-server 2009-10-11 12:05:22 UTC (rev 12986)
@@ -4,44 +4,14 @@
 
 server_port=10605
 service=tracker_service.py
-thttpd=/usr/sbin/thttpd
+url="http://localhost:$server_port/tracker";
 
-if ! command -v mktemp > /dev/null ; then
-    echo 'error: mktemp required'
-    exit 1
-elif ! command -v servinvoke > /dev/null ; then
-    echo 'error: servinvoke required'
-    exit 1
-elif ! test -x $thttpd ; then
-    echo 'error: thttpd required'
-    exit 1
-fi
-
-bindir=`dirname $0`
+bindir="`dirname $0`"
 if ! test -r "$bindir/$service" ; then
     echo "error: failed to locate bin directory (tried $bindir)"
     exit 1
 fi
 
-webroot=`mktemp -d`
-if ! test -d $webroot ; then
-    echo "error: invalid TMPDIR setting"
-    rm -rf -- "$webroot"
-    exit 1
-fi
-trap "rm -rf $webroot" 0
-cat > $webroot/tracker <<EOF
-#!/usr/bin/servinvoke
-
-copy-env
-target-unix $webroot/service-socket
-EOF
-chmod 755 $webroot/tracker
-$thttpd -h localhost -p $server_port -c tracker \
-    -d $webroot -l $webroot/log -i $webroot/pid
-echo "URL: http://localhost:$server_port/tracker";
-
 cd "$bindir"
-python $service $webroot/service-socket ../data/security.db || true
-read pid < $webroot/pid
-kill "$pid"
+echo "URL: $url"
+python "$service" "$url" localhost "$server_port" ../data/security.db || true


_______________________________________________
Secure-testing-commits mailing list
Secure-testing-commits@lists.alioth.debian.org
http://lists.alioth.debian.org/mailman/listinfo/secure-testing-commits

Reply via email to