run tests in build root (merged #228)

git-svn-id: svn://svn.lighttpd.net/lighttpd/branches/lighttpd-merge-1.4.x@640 152afb58-edef-0310-8abb-c4023f1b3aa9
svn/tags/lighttpd-1.4.2
Jan Kneschke 18 years ago
parent 0f30ffa145
commit 15b0109071

@ -8,14 +8,23 @@ use Test::More;
sub new {
my $class = shift;
my $self = {};
my $lpath;
$self->{CONFIGFILE} = 'lighttpd.conf';
$self->{BASEDIR} = (defined $ENV{'top_builddir'} ? $ENV{'top_builddir'} : '..');
$self->{SRCDIR} = (defined $ENV{'srcdir'} ? $ENV{'srcdir'} : '.');
$lpath = (defined $ENV{'top_builddir'} ? $ENV{'top_builddir'} : '..');
$lpath = `readlink -f '$lpath'`;
chomp $lpath;
$self->{BASEDIR} = $lpath;
$lpath = (defined $ENV{'srcdir'} ? $ENV{'srcdir'} : '.');
# $lpath = `readlink -f '$lpath'`;
# chomp $lpath;
$self->{SRCDIR} = $lpath;
$self->{LIGHTTPD_PATH} = $self->{BASEDIR}.'/src/lighttpd';
$self->{LIGHTTPD_PIDFILE} = '/tmp/lighttpd/lighttpd.pid';
$self->{PIDOF_PIDFILE} = '/tmp/lighttpd/pidof.pid';
$self->{LIGHTTPD_PIDFILE} = $self->{SRCDIR}.'/tmp/lighttpd/lighttpd.pid';
$self->{PIDOF_PIDFILE} = $self->{SRCDIR}.'/tmp/lighttpd/pidof.pid';
$self->{PORT} = 2048;
bless($self, $class);
@ -63,24 +72,22 @@ sub start_proc {
# pre-process configfile if necessary
#
my $pwd = `pwd`;
chomp($pwd);
unlink("/tmp/cfg.file");
system("cat ".$self->{SRCDIR}."/".$self->{CONFIGFILE}.' | perl -pe "s#\@SRCDIR\@#'.$pwd.'/'.$self->{BASEDIR}.'/tests/#" > /tmp/cfg.file');
unlink($self->{SRCDIR}."/tmp/cfg.file");
system("cat ".$self->{SRCDIR}."/".$self->{CONFIGFILE}.' | perl -pe "s#\@SRCDIR\@#'.$self->{BASEDIR}.'/tests/#" > '.$self->{SRCDIR}.'/tmp/cfg.file');
unlink($self->{LIGHTTPD_PIDFILE});
if (1) {
system($self->{LIGHTTPD_PATH}." -f /tmp/cfg.file");
system($self->{LIGHTTPD_PATH}." -f ".$self->{SRCDIR}."/tmp/cfg.file -m ".$self->{BASEDIR}."/src/.libs");
select(undef, undef, undef, 0.1);
} else {
system("valgrind --tool=memcheck --show-reachable=yes --leak-check=yes --logfile=foo ".$self->{LIGHTTPD_PATH}." -D -f /tmp/cfg.file &");
system("valgrind --tool=memcheck --show-reachable=yes --leak-check=yes --logfile=foo ".$self->{LIGHTTPD_PATH}." -D -f ".$self->{SRCDIR}."/tmp/cfg.file -m ".$self->{BASEDIR}."/src/.libs &");
select(undef, undef, undef, 2);
}
# sleep(1);
unlink("/tmp/cfg.file");
unlink($self->{SRCDIR}."/tmp/cfg.file");
# no pidfile, we failed
if (not -e $self->{LIGHTTPD_PIDFILE}) {

@ -1,5 +1,5 @@
# lighttpd.conf and conformance.pl expect this directory
testdir=/tmp/lighttpd/
testdir=$(srcdir)/tmp/lighttpd/
if CHECK_WITH_FASTCGI
check_PROGRAMS=fcgi-auth fcgi-responder

@ -1,5 +1,5 @@
server.document-root = "/tmp/lighttpd/servers/www.example.org/pages/"
server.pid-file = "/tmp/lighttpd/lighttpd.pid"
server.document-root = "@SRCDIR@/tmp/lighttpd/servers/www.example.org/pages/"
server.pid-file = "@SRCDIR@/tmp/lighttpd/lighttpd.pid"
## bind to port (default: 80)
server.port = 2048
@ -8,7 +8,7 @@ server.port = 2048
## bind to localhost (default: all interfaces)
server.bind = "localhost"
server.errorlog = "/tmp/lighttpd/logs/lighttpd.error.log"
server.errorlog = "@SRCDIR@/tmp/lighttpd/logs/lighttpd.error.log"
server.name = "www.example.org"
server.tag = "Apache 1.3.29"
@ -59,7 +59,7 @@ server.indexfiles = ( "index.html",
######################## MODULE CONFIG ############################
accesslog.filename = "/tmp/lighttpd/logs/lighttpd.access.log"
accesslog.filename = "@SRCDIR@/tmp/lighttpd/logs/lighttpd.access.log"
mimetype.assign = ( ".png" => "image/png",
".jpg" => "image/jpeg",
@ -77,7 +77,7 @@ mimetype.assign = ( ".png" => "image/png",
".c" => "text/plain",
".conf" => "text/plain" )
compress.cache-dir = "/tmp/lighttpd/cache/compress/"
compress.cache-dir = "@SRCDIR@/tmp/lighttpd/cache/compress/"
compress.filetype = ("text/plain", "text/html")
setenv.add-environment = ( "TRAC_ENV" => "foo")
@ -90,7 +90,7 @@ fastcgi.server = ( ".php" => (
"host" => "127.0.0.1",
"port" => 1026,
# "mode" => "authorizer",
# "docroot" => "/tmp/lighttpd/servers/www.example.org/pages/",
# "docroot" => "@SRCDIR@/tmp/lighttpd/servers/www.example.org/pages/",
)
)
)
@ -106,7 +106,7 @@ ssl.engine = "disable"
ssl.pemfile = "server.pem"
auth.backend = "plain"
auth.backend.plain.userfile = "/tmp/lighttpd/lighttpd.user"
auth.backend.plain.userfile = "@SRCDIR@/tmp/lighttpd/lighttpd.user"
auth.backend.plain.groupfile = "lighttpd.group"
auth.backend.ldap.hostname = "localhost"
@ -149,15 +149,15 @@ status.status-url = "/server-status"
status.config-url = "/server-config"
simple-vhost.document-root = "pages"
simple-vhost.server-root = "/tmp/lighttpd/servers/"
simple-vhost.server-root = "@SRCDIR@/tmp/lighttpd/servers/"
simple-vhost.default-host = "www.example.org"
$HTTP["host"] == "vvv.example.org" {
server.document-root = "/tmp/lighttpd/servers/www.example.org/pages/"
server.document-root = "@SRCDIR@/tmp/lighttpd/servers/www.example.org/pages/"
}
$HTTP["host"] == "zzz.example.org" {
server.document-root = "/tmp/lighttpd/servers/www.example.org/pages/"
server.document-root = "@SRCDIR@/tmp/lighttpd/servers/www.example.org/pages/"
server.name = "zzz.example.org"
}

@ -1,5 +1,5 @@
server.document-root = "/tmp/lighttpd/servers/www.example.org/pages/"
server.pid-file = "/tmp/lighttpd/lighttpd.pid"
server.document-root = "@SRCDIR@/tmp/lighttpd/servers/www.example.org/pages/"
server.pid-file = "@SRCDIR@/tmp/lighttpd/lighttpd.pid"
## bind to port (default: 80)
server.port = 2048
@ -8,7 +8,7 @@ server.port = 2048
## bind to localhost (default: all interfaces)
server.bind = "localhost"
server.errorlog = "/tmp/lighttpd/logs/lighttpd.error.log"
server.errorlog = "@SRCDIR@/tmp/lighttpd/logs/lighttpd.error.log"
server.name = "www.example.org"
server.tag = "Apache 1.3.29"
@ -61,7 +61,7 @@ server.error-handler-404 = "/indexfile/return-404.php"
######################## MODULE CONFIG ############################
accesslog.filename = "/tmp/lighttpd/logs/lighttpd.access.log"
accesslog.filename = "@SRCDIR@/tmp/lighttpd/logs/lighttpd.access.log"
mimetype.assign = ( ".png" => "image/png",
".jpg" => "image/jpeg",
@ -79,7 +79,7 @@ mimetype.assign = ( ".png" => "image/png",
".c" => "text/plain",
".conf" => "text/plain" )
compress.cache-dir = "/tmp/lighttpd/cache/compress/"
compress.cache-dir = "@SRCDIR@/tmp/lighttpd/cache/compress/"
compress.filetype = ("text/plain", "text/html")
setenv.add-environment = ( "TRAC_ENV" => "foo")
@ -92,7 +92,7 @@ fastcgi.server = ( ".php" => (
"host" => "127.0.0.1",
"port" => 1026,
# "mode" => "authorizer",
# "docroot" => "/tmp/lighttpd/servers/www.example.org/pages/",
# "docroot" => "@SRCDIR@/tmp/lighttpd/servers/www.example.org/pages/",
)
)
)
@ -108,7 +108,7 @@ ssl.engine = "disable"
ssl.pemfile = "server.pem"
auth.backend = "plain"
auth.backend.plain.userfile = "/tmp/lighttpd/lighttpd.user"
auth.backend.plain.userfile = "@SRCDIR@/tmp/lighttpd/lighttpd.user"
auth.backend.plain.groupfile = "lighttpd.group"
auth.backend.ldap.hostname = "localhost"
@ -151,15 +151,15 @@ status.status-url = "/server-status"
status.config-url = "/server-config"
simple-vhost.document-root = "pages"
simple-vhost.server-root = "/tmp/lighttpd/servers/"
simple-vhost.server-root = "@SRCDIR@/tmp/lighttpd/servers/"
simple-vhost.default-host = "www.example.org"
$HTTP["host"] == "vvv.example.org" {
server.document-root = "/tmp/lighttpd/servers/www.example.org/pages/"
server.document-root = "@SRCDIR@/tmp/lighttpd/servers/www.example.org/pages/"
}
$HTTP["host"] == "zzz.example.org" {
server.document-root = "/tmp/lighttpd/servers/www.example.org/pages/"
server.document-root = "@SRCDIR@/tmp/lighttpd/servers/www.example.org/pages/"
server.name = "zzz.example.org"
}

@ -1,11 +1,11 @@
#!/bin/sh
tmpdir=/tmp/lighttpd
if test x$srcdir = x; then
srcdir=.
fi
tmpdir=$srcdir/tmp/lighttpd
# create test-framework
# rm -rf $tmpdir

@ -2,15 +2,15 @@
debug.log-request-handling = "enable"
debug.log-condition-handling = "enable"
server.document-root = "/tmp/lighttpd/servers/www.example.org/pages/"
server.pid-file = "/tmp/lighttpd/lighttpd.pid"
server.document-root = "@SRCDIR@/tmp/lighttpd/servers/www.example.org/pages/"
server.pid-file = "@SRCDIR@/tmp/lighttpd/lighttpd.pid"
## bind to port (default: 80)
server.port = 2048
## bind to localhost (default: all interfaces)
server.bind = "localhost"
server.errorlog = "/tmp/lighttpd/logs/lighttpd.error.log"
server.errorlog = "@SRCDIR@/tmp/lighttpd/logs/lighttpd.error.log"
server.name = "www.example.org"
server.tag = "Apache 1.3.29"
@ -22,25 +22,25 @@ server.modules = (
######################## MODULE CONFIG ############################
accesslog.filename = "/tmp/lighttpd/logs/lighttpd.access.log"
accesslog.filename = "@SRCDIR@/tmp/lighttpd/logs/lighttpd.access.log"
mimetype.assign = ( ".html" => "text/html" )
url.redirect = ("^" => "/default")
$HTTP["host"] == "www.example.org" {
server.document-root = "/tmp/lighttpd/servers/www.example.org/pages/"
server.document-root = "@SRCDIR@/tmp/lighttpd/servers/www.example.org/pages/"
server.name = "www.example.org"
url.redirect = ("^" => "/match_1")
}
else $HTTP["host"] == "test1.example.org" {
server.document-root = "/tmp/lighttpd/servers/www.example.org/pages/"
server.document-root = "@SRCDIR@/tmp/lighttpd/servers/www.example.org/pages/"
server.name = "test1.example.org"
url.redirect = ("^" => "/match_2")
}
# comments
else $HTTP["host"] == "test2.example.org" {
server.document-root = "/tmp/lighttpd/servers/www.example.org/pages/"
server.document-root = "@SRCDIR@/tmp/lighttpd/servers/www.example.org/pages/"
server.name = "test2.example.org"
url.redirect = ("^" => "/match_3")
}
@ -48,7 +48,7 @@ else $HTTP["host"] == "test2.example.org" {
# comments
else $HTTP["host"] == "test3.example.org" {
server.document-root = "/tmp/lighttpd/servers/www.example.org/pages/"
server.document-root = "@SRCDIR@/tmp/lighttpd/servers/www.example.org/pages/"
server.name = "test3.example.org"
url.redirect = ("^" => "/match_4")

@ -1,5 +1,5 @@
server.document-root = "/tmp/lighttpd/servers/www.example.org/pages/"
server.pid-file = "/tmp/lighttpd/lighttpd.pid"
server.document-root = "@SRCDIR@/tmp/lighttpd/servers/www.example.org/pages/"
server.pid-file = "@SRCDIR@/tmp/lighttpd/lighttpd.pid"
## bind to port (default: 80)
server.port = 2048
@ -8,7 +8,7 @@ server.port = 2048
## bind to localhost (default: all interfaces)
server.bind = "localhost"
server.errorlog = "/tmp/lighttpd/logs/lighttpd.error.log"
server.errorlog = "@SRCDIR@/tmp/lighttpd/logs/lighttpd.error.log"
server.name = "www.example.org"
server.tag = "Apache 1.3.29"
@ -57,7 +57,7 @@ server.indexfiles = ( "index.php", "index.html",
######################## MODULE CONFIG ############################
accesslog.filename = "/tmp/lighttpd/logs/lighttpd.access.log"
accesslog.filename = "@SRCDIR@/tmp/lighttpd/logs/lighttpd.access.log"
mimetype.assign = ( ".png" => "image/png",
".jpg" => "image/jpeg",
@ -75,7 +75,7 @@ mimetype.assign = ( ".png" => "image/png",
".c" => "text/plain",
".conf" => "text/plain" )
compress.cache-dir = "/tmp/lighttpd/cache/compress/"
compress.cache-dir = "@SRCDIR@/tmp/lighttpd/cache/compress/"
compress.filetype = ("text/plain", "text/html")
fastcgi.debug = 0
@ -103,7 +103,7 @@ ssl.engine = "disable"
ssl.pemfile = "server.pem"
auth.backend = "plain"
auth.backend.plain.userfile = "/tmp/lighttpd/lighttpd.user"
auth.backend.plain.userfile = "@SRCDIR@/tmp/lighttpd/lighttpd.user"
auth.backend.plain.groupfile = "lighttpd.group"
auth.backend.ldap.hostname = "localhost"
@ -146,11 +146,11 @@ status.status-url = "/server-status"
status.config-url = "/server-config"
$HTTP["host"] == "vvv.example.org" {
server.document-root = "/tmp/lighttpd/servers/www.example.org/pages/"
server.document-root = "@SRCDIR@/tmp/lighttpd/servers/www.example.org/pages/"
}
$HTTP["host"] == "zzz.example.org" {
server.document-root = "/tmp/lighttpd/servers/www.example.org/pages/"
server.document-root = "@SRCDIR@/tmp/lighttpd/servers/www.example.org/pages/"
server.name = "zzz.example.org"
}

@ -1,5 +1,5 @@
server.document-root = "/tmp/lighttpd/servers/www.example.org/pages/"
server.pid-file = "/tmp/lighttpd/lighttpd.pid"
server.document-root = "@SRCDIR@/tmp/lighttpd/servers/www.example.org/pages/"
server.pid-file = "@SRCDIR@/tmp/lighttpd/lighttpd.pid"
debug.log-request-header = "enable"
debug.log-response-header = "enable"
@ -12,7 +12,7 @@ server.port = 2048
## bind to localhost (default: all interfaces)
server.bind = "localhost"
server.errorlog = "/tmp/lighttpd/logs/lighttpd.error.log"
server.errorlog = "@SRCDIR@/tmp/lighttpd/logs/lighttpd.error.log"
server.name = "www.example.org"
server.tag = "Apache 1.3.29"
@ -61,7 +61,7 @@ server.indexfiles = ( "index.php", "index.html",
######################## MODULE CONFIG ############################
accesslog.filename = "/tmp/lighttpd/logs/lighttpd.access.log"
accesslog.filename = "@SRCDIR@/tmp/lighttpd/logs/lighttpd.access.log"
mimetype.assign = ( ".png" => "image/png",
".jpg" => "image/jpeg",
@ -79,7 +79,7 @@ mimetype.assign = ( ".png" => "image/png",
".c" => "text/plain",
".conf" => "text/plain" )
compress.cache-dir = "/tmp/lighttpd/cache/compress/"
compress.cache-dir = "@SRCDIR@/tmp/lighttpd/cache/compress/"
compress.filetype = ("text/plain", "text/html")
fastcgi.debug = 0
@ -103,7 +103,7 @@ ssl.engine = "disable"
ssl.pemfile = "server.pem"
auth.backend = "plain"
auth.backend.plain.userfile = "/tmp/lighttpd/lighttpd.user"
auth.backend.plain.userfile = "@SRCDIR@/tmp/lighttpd/lighttpd.user"
auth.backend.plain.groupfile = "lighttpd.group"
auth.backend.ldap.hostname = "localhost"
@ -146,11 +146,11 @@ status.status-url = "/server-status"
status.config-url = "/server-config"
$HTTP["host"] == "vvv.example.org" {
server.document-root = "/tmp/lighttpd/servers/www.example.org/pages/"
server.document-root = "@SRCDIR@/tmp/lighttpd/servers/www.example.org/pages/"
}
$HTTP["host"] == "zzz.example.org" {
server.document-root = "/tmp/lighttpd/servers/www.example.org/pages/"
server.document-root = "@SRCDIR@/tmp/lighttpd/servers/www.example.org/pages/"
server.name = "zzz.example.org"
}

@ -1,5 +1,5 @@
server.document-root = "/tmp/lighttpd/servers/www.example.org/pages/"
server.pid-file = "/tmp/lighttpd/lighttpd.pid"
server.document-root = "@SRCDIR@/tmp/lighttpd/servers/www.example.org/pages/"
server.pid-file = "@SRCDIR@/tmp/lighttpd/lighttpd.pid"
debug.log-request-header = "enable"
debug.log-response-header = "enable"
@ -12,7 +12,7 @@ server.port = 2048
## bind to localhost (default: all interfaces)
server.bind = "localhost"
server.errorlog = "/tmp/lighttpd/logs/lighttpd.error.log"
server.errorlog = "@SRCDIR@/tmp/lighttpd/logs/lighttpd.error.log"
server.name = "www.example.org"
server.tag = "Apache 1.3.29"
@ -61,7 +61,7 @@ server.indexfiles = ( "index.php", "index.html",
######################## MODULE CONFIG ############################
accesslog.filename = "/tmp/lighttpd/logs/lighttpd.access.log"
accesslog.filename = "@SRCDIR@/tmp/lighttpd/logs/lighttpd.access.log"
mimetype.assign = ( ".png" => "image/png",
".jpg" => "image/jpeg",
@ -79,7 +79,7 @@ mimetype.assign = ( ".png" => "image/png",
".c" => "text/plain",
".conf" => "text/plain" )
compress.cache-dir = "/tmp/lighttpd/cache/compress/"
compress.cache-dir = "@SRCDIR@/tmp/lighttpd/cache/compress/"
compress.filetype = ("text/plain", "text/html")
fastcgi.debug = 0
@ -89,7 +89,7 @@ fastcgi.server = ( "/" => (
"port" => 20000,
"bin-path" => "@SRCDIR@/fcgi-auth",
"mode" => "authorizer",
"docroot" => "/tmp/lighttpd/servers/www.example.org/pages/",
"docroot" => "@SRCDIR@/tmp/lighttpd/servers/www.example.org/pages/",
)
)
@ -106,7 +106,7 @@ ssl.engine = "disable"
ssl.pemfile = "server.pem"
auth.backend = "plain"
auth.backend.plain.userfile = "/tmp/lighttpd/lighttpd.user"
auth.backend.plain.userfile = "@SRCDIR@/tmp/lighttpd/lighttpd.user"
auth.backend.plain.groupfile = "lighttpd.group"
auth.backend.ldap.hostname = "localhost"
@ -149,11 +149,11 @@ status.status-url = "/server-status"
status.config-url = "/server-config"
$HTTP["host"] == "vvv.example.org" {
server.document-root = "/tmp/lighttpd/servers/www.example.org/pages/"
server.document-root = "@SRCDIR@/tmp/lighttpd/servers/www.example.org/pages/"
}
$HTTP["host"] == "zzz.example.org" {
server.document-root = "/tmp/lighttpd/servers/www.example.org/pages/"
server.document-root = "@SRCDIR@/tmp/lighttpd/servers/www.example.org/pages/"
server.name = "zzz.example.org"
}

@ -1,5 +1,5 @@
server.document-root = "/tmp/lighttpd/servers/www.example.org/pages/"
server.pid-file = "/tmp/lighttpd/lighttpd.pid"
server.document-root = "@SRCDIR@/tmp/lighttpd/servers/www.example.org/pages/"
server.pid-file = "@SRCDIR@/tmp/lighttpd/lighttpd.pid"
#debug.log-request-header = "enable"
#debug.log-response-header = "enable"
@ -15,7 +15,7 @@ server.port = 2048
## bind to localhost (default: all interfaces)
server.bind = "localhost"
server.errorlog = "/tmp/lighttpd/logs/lighttpd.error.log"
server.errorlog = "@SRCDIR@/tmp/lighttpd/logs/lighttpd.error.log"
server.name = "www.example.org"
server.tag = "Apache 1.3.29"
@ -64,7 +64,7 @@ server.indexfiles = ( "index.php", "index.html",
######################## MODULE CONFIG ############################
accesslog.filename = "/tmp/lighttpd/logs/lighttpd.access.log"
accesslog.filename = "@SRCDIR@/tmp/lighttpd/logs/lighttpd.access.log"
mimetype.assign = ( ".png" => "image/png",
".jpg" => "image/jpeg",
@ -82,7 +82,7 @@ mimetype.assign = ( ".png" => "image/png",
".c" => "text/plain",
".conf" => "text/plain" )
compress.cache-dir = "/tmp/lighttpd/cache/compress/"
compress.cache-dir = "@SRCDIR@/tmp/lighttpd/cache/compress/"
compress.filetype = ("text/plain", "text/html")
fastcgi.debug = 0
@ -109,7 +109,7 @@ ssl.engine = "disable"
ssl.pemfile = "server.pem"
auth.backend = "plain"
auth.backend.plain.userfile = "/tmp/lighttpd/lighttpd.user"
auth.backend.plain.userfile = "@SRCDIR@/tmp/lighttpd/lighttpd.user"
auth.backend.plain.groupfile = "lighttpd.group"
auth.backend.ldap.hostname = "localhost"
@ -152,11 +152,11 @@ status.status-url = "/server-status"
status.config-url = "/server-config"
$HTTP["host"] == "vvv.example.org" {
server.document-root = "/tmp/lighttpd/servers/www.example.org/pages/"
server.document-root = "@SRCDIR@/tmp/lighttpd/servers/www.example.org/pages/"
}
$HTTP["host"] == "zzz.example.org" {
server.document-root = "/tmp/lighttpd/servers/www.example.org/pages/"
server.document-root = "@SRCDIR@/tmp/lighttpd/servers/www.example.org/pages/"
server.name = "zzz.example.org"
}

@ -1,12 +1,12 @@
server.document-root = "/tmp/lighttpd/servers/www.example.org/pages/"
server.pid-file = "/tmp/lighttpd/lighttpd.pid"
server.document-root = "@SRCDIR@/tmp/lighttpd/servers/www.example.org/pages/"
server.pid-file = "@SRCDIR@/tmp/lighttpd/lighttpd.pid"
## bind to port (default: 80)
server.port = 2048
## bind to localhost (default: all interfaces)
server.bind = "localhost"
server.errorlog = "/tmp/lighttpd/logs/lighttpd.error.log"
server.errorlog = "@SRCDIR@/tmp/lighttpd/logs/lighttpd.error.log"
server.name = "www.example.org"
server.tag = "Apache 1.3.29"
@ -44,7 +44,7 @@ server.indexfiles = ( "index.php", "index.html",
ssi.extension = ( ".shtml" )
accesslog.filename = "/tmp/lighttpd/logs/lighttpd.access.log"
accesslog.filename = "@SRCDIR@/tmp/lighttpd/logs/lighttpd.access.log"
mimetype.assign = ( ".png" => "image/png",
".jpg" => "image/jpeg",
@ -62,7 +62,7 @@ mimetype.assign = ( ".png" => "image/png",
".c" => "text/plain",
".conf" => "text/plain" )
compress.cache-dir = "/tmp/lighttpd/cache/compress/"
compress.cache-dir = "@SRCDIR@/tmp/lighttpd/cache/compress/"
compress.filetype = ("text/plain", "text/html")
secdownload.secret = "verysecret"
@ -91,7 +91,7 @@ ssl.engine = "disable"
ssl.pemfile = "server.pem"
auth.backend = "plain"
auth.backend.plain.userfile = "/tmp/lighttpd/lighttpd.user"
auth.backend.plain.userfile = "@SRCDIR@/tmp/lighttpd/lighttpd.user"
auth.backend.plain.groupfile = "lighttpd.group"
auth.backend.ldap.hostname = "localhost"
@ -136,22 +136,22 @@ status.status-url = "/server-status"
status.config-url = "/server-config"
$HTTP["host"] == "vvv.example.org" {
server.document-root = "/tmp/lighttpd/servers/www.example.org/pages/"
server.document-root = "@SRCDIR@/tmp/lighttpd/servers/www.example.org/pages/"
}
$HTTP["host"] == "zzz.example.org" {
server.document-root = "/tmp/lighttpd/servers/www.example.org/pages/"
server.document-root = "@SRCDIR@/tmp/lighttpd/servers/www.example.org/pages/"
server.name = "zzz.example.org"
}
$HTTP["host"] == "no-simple.example.org" {
server.document-root = "/tmp/lighttpd/servers/123.example.org/pages/"
server.document-root = "@SRCDIR@/tmp/lighttpd/servers/123.example.org/pages/"
server.name = "zzz.example.org"
}
$HTTP["host"] !~ "(no-simple\.example\.org)" {
simple-vhost.document-root = "pages"
simple-vhost.server-root = "/tmp/lighttpd/servers/"
simple-vhost.server-root = "@SRCDIR@/tmp/lighttpd/servers/"
simple-vhost.default-host = "www.example.org"
}

@ -22,11 +22,11 @@ my $t;
$tf_real->{PORT} = 2048;
$tf_real->{CONFIGFILE} = 'lighttpd.conf';
$tf_real->{LIGHTTPD_PIDFILE} = '/tmp/lighttpd/lighttpd.pid';
$tf_real->{LIGHTTPD_PIDFILE} = $tf_real->{SRCDIR}.'/tmp/lighttpd/lighttpd.pid';
$tf_proxy->{PORT} = 2050;
$tf_proxy->{CONFIGFILE} = 'proxy.conf';
$tf_proxy->{LIGHTTPD_PIDFILE} = '/tmp/lighttpd/lighttpd-proxy.pid';
$tf_proxy->{LIGHTTPD_PIDFILE} = $tf_proxy->{SRCDIR}.'/tmp/lighttpd/lighttpd-proxy.pid';
ok($tf_real->start_proc == 0, "Starting lighttpd") or die();

@ -1,11 +1,11 @@
#!/bin/sh
tmpdir=/tmp/lighttpd
if test x$srcdir = x; then
srcdir=.
fi
tmpdir=$srcdir/tmp/lighttpd
# create test-framework
rm -rf $tmpdir
mkdir -p $tmpdir/servers/www.example.org/pages/
@ -24,6 +24,9 @@ cp $srcdir/docroot/www/*.html \
$srcdir/docroot/www/*.pl \
$srcdir/docroot/www/*.fcgi \
$srcdir/docroot/www/*.shtml \
$srcdir/docroot/www/*.jpg \
$srcdir/docroot/www/*.JPG \
$srcdir/docroot/www/a \
$srcdir/docroot/www/*.txt $tmpdir/servers/www.example.org/pages/
cp $srcdir/docroot/www/go/*.php $tmpdir/servers/www.example.org/pages/go/
cp $srcdir/docroot/www/expire/*.txt $tmpdir/servers/www.example.org/pages/expire/
@ -33,7 +36,7 @@ cp $srcdir/docroot/123/*.txt \
$srcdir/docroot/123/*.php \
$srcdir/docroot/123/*.bla $tmpdir/servers/123.example.org/pages/
cp $srcdir/lighttpd.user $tmpdir/
cp $srcdir/var-include-sub.conf /tmp/
cp $srcdir/var-include-sub.conf $srcdir/tmp
printf "%-40s" "preparing infrastructure"

@ -1,12 +1,12 @@
server.document-root = "/tmp/lighttpd/servers/www.example.org/pages/"
server.pid-file = "/tmp/lighttpd/lighttpd-proxy.pid"
server.document-root = "@SRCDIR@/tmp/lighttpd/servers/www.example.org/pages/"
server.pid-file = "@SRCDIR@/tmp/lighttpd/lighttpd-proxy.pid"
## bind to port (default: 80)
server.port = 2050
## bind to localhost (default: all interfaces)
server.bind = "localhost"
server.errorlog = "/tmp/lighttpd/logs/lighttpd.error.log"
server.errorlog = "@SRCDIR@/tmp/lighttpd/logs/lighttpd.error.log"
server.name = "www.example.org"
server.tag = "Proxy"
@ -42,7 +42,7 @@ server.indexfiles = ( "index.php", "index.html",
######################## MODULE CONFIG ############################
accesslog.filename = "/tmp/lighttpd/logs/lighttpd.access.log"
accesslog.filename = "@SRCDIR@/tmp/lighttpd/logs/lighttpd.access.log"
mimetype.assign = ( ".png" => "image/png",
".jpg" => "image/jpeg",
@ -60,7 +60,7 @@ mimetype.assign = ( ".png" => "image/png",
".c" => "text/plain",
".conf" => "text/plain" )
compress.cache-dir = "/tmp/lighttpd/cache/compress/"
compress.cache-dir = "@SRCDIR@/tmp/lighttpd/cache/compress/"
compress.filetype = ("text/plain", "text/html")
setenv.add-environment = ( "TRAC_ENV" => "foo")
@ -88,7 +88,7 @@ ssl.engine = "disable"
ssl.pemfile = "server.pem"
auth.backend = "plain"
auth.backend.plain.userfile = "/tmp/lighttpd/lighttpd.user"
auth.backend.plain.userfile = "@SRCDIR@/tmp/lighttpd/lighttpd.user"
auth.backend.plain.groupfile = "lighttpd.group"
auth.backend.ldap.hostname = "localhost"
@ -135,22 +135,22 @@ status.status-url = "/server-status"
status.config-url = "/server-config"
$HTTP["host"] == "vvv.example.org" {
server.document-root = "/tmp/lighttpd/servers/www.example.org/pages/"
server.document-root = "@SRCDIR@/tmp/lighttpd/servers/www.example.org/pages/"
}
$HTTP["host"] == "zzz.example.org" {
server.document-root = "/tmp/lighttpd/servers/www.example.org/pages/"
server.document-root = "@SRCDIR@/tmp/lighttpd/servers/www.example.org/pages/"
server.name = "zzz.example.org"
}
$HTTP["host"] == "no-simple.example.org" {
server.document-root = "/tmp/lighttpd/servers/123.example.org/pages/"
server.document-root = "@SRCDIR@/tmp/lighttpd/servers/123.example.org/pages/"
server.name = "zzz.example.org"
}
$HTTP["host"] !~ "(no-simple\.example\.org)" {
simple-vhost.document-root = "pages"
simple-vhost.server-root = "/tmp/lighttpd/servers/"
simple-vhost.server-root = "@SRCDIR@/tmp/lighttpd/servers/"
simple-vhost.default-host = "www.example.org"
}

@ -2,15 +2,15 @@
debug.log-request-handling = "enable"
debug.log-condition-handling = "enable"
server.document-root = "/tmp/lighttpd/servers/www.example.org/pages/"
server.pid-file = "/tmp/lighttpd/lighttpd.pid"
server.document-root = "@SRCDIR@/tmp/lighttpd/servers/www.example.org/pages/"
server.pid-file = "@SRCDIR@/tmp/lighttpd/lighttpd.pid"
## bind to port (default: 80)
server.port = 2048
## bind to localhost (default: all interfaces)
server.bind = "localhost"
server.errorlog = "/tmp/lighttpd/logs/lighttpd.error.log"
server.errorlog = "@SRCDIR@/tmp/lighttpd/logs/lighttpd.error.log"
server.name = "www.example.org"
server.tag = "Apache 1.3.29"
@ -21,19 +21,19 @@ server.modules = ( "mod_redirect",
######################## MODULE CONFIG ############################
accesslog.filename = "/tmp/lighttpd/logs/lighttpd.access.log"
accesslog.filename = "@SRCDIR@/tmp/lighttpd/logs/lighttpd.access.log"
mimetype.assign = ( ".html" => "text/html" )
url.redirect = ("^" => "/default")
$HTTP["host"] == "www.example.org" {
server.document-root = "/tmp/lighttpd/servers/www.example.org/pages/"
server.document-root = "@SRCDIR@/tmp/lighttpd/servers/www.example.org/pages/"
server.name = "www.example.org"
url.redirect = ("^" => "/redirect")
}
$HTTP["host"] == "test.example.org" {
server.document-root = "/tmp/lighttpd/servers/www.example.org/pages/"
server.document-root = "@SRCDIR@/tmp/lighttpd/servers/www.example.org/pages/"
server.name = "test.example.org"
var.myvar = "good"
var.one = 1

Loading…
Cancel
Save