diff --git a/tests/run-tests.pl b/tests/run-tests.pl index ea90113a..3b1909f9 100755 --- a/tests/run-tests.pl +++ b/tests/run-tests.pl @@ -4,12 +4,14 @@ use strict; use IO::Socket; use Test::More tests => 126; +my $basedir = (defined $ENV{'top_builddir'} ? $ENV{'top_builddir'} : '.'); +my $srcdir = (defined $ENV{'srcdir'} ? $ENV{'srcdir'} : '.'); my $testname; my @request; my @response; -my $configfile = 'lighttpd.conf'; -my $lighttpd_path = '../src/lighttpd'; +my $configfile = $srcdir.'/lighttpd.conf'; +my $lighttpd_path = $basedir.'/src/lighttpd'; my $pidfile = '/tmp/lighttpd/lighttpd.pid'; my $pidoffile = '/tmp/lighttpd/pidof.pid'; @@ -1125,8 +1127,8 @@ ok(stop_proc == 0, "Stopping lighttpd"); print "\nspecial config\n"; -$configfile = 'fastcgi-10.conf'; -ok(start_proc == 0, "Starting lighttpd with fastcgi-10.conf") or die(); +$configfile = $srcdir.'/fastcgi-10.conf'; +ok(start_proc == 0, "Starting lighttpd with $configfile") or die(); @request = ( <