diff options
author | David Kalnischkies <kalnischkies@gmail.com> | 2011-04-27 14:38:48 +0200 |
---|---|---|
committer | David Kalnischkies <kalnischkies@gmail.com> | 2011-04-27 14:38:48 +0200 |
commit | c5bcc6074c1e0f9881529709a8489cccb674a3d4 (patch) | |
tree | 436cdc65d4631b15bda9f30e9c8d08f5b4bf4282 | |
parent | 3b422ab4b2df243f48330a3329e98c9506d791c6 (diff) | |
download | apt-c5bcc6074c1e0f9881529709a8489cccb674a3d4.tar.gz |
support lighttpd as test webserver but still prefer weborf
-rw-r--r-- | test/integration/framework | 21 |
1 files changed, 15 insertions, 6 deletions
diff --git a/test/integration/framework b/test/integration/framework index b257738e7..cc5af798c 100644 --- a/test/integration/framework +++ b/test/integration/framework @@ -573,13 +573,22 @@ changetowebserver() { if which weborf > /dev/null; then weborf -xb aptarchive/ 2>&1 > /dev/null & addtrap "kill $!;" - local APTARCHIVE="file://$(readlink -f ./aptarchive)" - for LIST in $(find rootdir/etc/apt/sources.list.d/ -name 'apt-test-*.list'); do - sed -i $LIST -e "s#$APTARCHIVE#http://localhost:8080/#" - done - return 0 + elif which lighttpd > /dev/null; then + echo "server.document-root = \"$(readlink -f ./aptarchive)\" +server.port = 8080 +server.stat-cache-engine = \"disable\"" > lighttpd.conf + lighttpd -t -f lighttpd.conf >/dev/null || msgdie 'Can not change to webserver: our lighttpd config is invalid' + lighttpd -D -f lighttpd.conf 2>/dev/null >/dev/null & + addtrap "kill $!;" + else + msgdie 'You have to install weborf or lighttpd first' + return 1 fi - return 1 + local APTARCHIVE="file://$(readlink -f ./aptarchive)" + for LIST in $(find rootdir/etc/apt/sources.list.d/ -name 'apt-test-*.list'); do + sed -i $LIST -e "s#$APTARCHIVE#http://localhost:8080/#" + done + return 0 } checkdiff() { |