From 877161c06723c477922c8c0b9fe4f52f621b527d Mon Sep 17 00:00:00 2001 From: Jan Kneschke Date: Sun, 26 Jun 2005 10:27:41 +0000 Subject: switch to LigtyTest module git-svn-id: svn://svn.lighttpd.net/lighttpd/branches/lighttpd-1.3.x@394 152afb58-edef-0310-8abb-c4023f1b3aa9 --- tests/LightyTest.pm | 5 ++++- tests/Makefile.am | 12 +++++++----- tests/core-request.t | 6 ++++++ tests/core-response.t | 7 +++++++ tests/core.t | 7 +++++++ tests/mod-access.t | 6 ++++++ tests/mod-auth.t | 6 ++++++ tests/mod-cgi.t | 6 ++++++ tests/mod-compress.t | 6 ++++++ tests/mod-fastcgi.t | 6 ++++++ tests/mod-proxy.t | 6 ++++++ tests/mod-redirect.t | 6 ++++++ tests/mod-rewrite.t | 6 ++++++ tests/mod-userdir.t | 6 ++++++ tests/request.t | 6 ++++++ 15 files changed, 91 insertions(+), 6 deletions(-) diff --git a/tests/LightyTest.pm b/tests/LightyTest.pm index 2fa43370..e38de06d 100755 --- a/tests/LightyTest.pm +++ b/tests/LightyTest.pm @@ -71,8 +71,11 @@ sub start_proc { unlink($self->{LIGHTTPD_PIDFILE}); system($self->{LIGHTTPD_PATH}." -f /tmp/cfg.file"); # system("valgrind --tool=memcheck --show-reachable=yes --leak-check=yes --logfile=foo ".$lighttpd_path." -D -f /tmp/cfg.file &"); + # + + select(undef, undef, undef, 0.1); - sleep(1); + # sleep(1); unlink("/tmp/cfg.file"); diff --git a/tests/Makefile.am b/tests/Makefile.am index e386a06d..54e629ae 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -12,9 +12,9 @@ fcgi_responder_LDADD=-lfcgi endif TESTS=\ -prepare.sh \ -run-tests.pl \ -cleanup.sh + prepare.sh \ + run-tests.pl \ + cleanup.sh CONFS=fastcgi-10.conf \ fastcgi-auth.conf \ @@ -33,15 +33,17 @@ CONFS=fastcgi-10.conf \ mod-redirect.t \ mod-userdir.t \ mod-rewrite.t \ - request.t + request.t \ + LightyTest.pm -TESTS_ENVIRONMENT=$(srcdir)/wrapper.sh $(srcdir) $(top_builddir) +TESTS_ENVIRONMENT=$(srcdir)/wrapper.sh $(srcdir) $(top_builddir) EXTRA_DIST=wrapper.sh lighttpd.conf \ lighttpd.user \ $(CONFS) \ $(TESTS) + SUBDIRS=docroot leak-check: diff --git a/tests/core-request.t b/tests/core-request.t index 690c64c4..a4fa9db7 100755 --- a/tests/core-request.t +++ b/tests/core-request.t @@ -1,4 +1,10 @@ #! /usr/bin/perl -w +BEGIN { + # add current source dir to the include-path + # we need this for make distcheck + (my $srcdir = $0) =~ s#/[^/]+$#/#; + unshift @INC, $srcdir; +} use strict; use IO::Socket; diff --git a/tests/core-response.t b/tests/core-response.t index 3be4618b..21c9a137 100755 --- a/tests/core-response.t +++ b/tests/core-response.t @@ -1,5 +1,12 @@ #! /usr/bin/perl -w +BEGIN { + # add current source dir to the include-path + # we need this for make distcheck + (my $srcdir = $0) =~ s#/[^/]+$#/#; + unshift @INC, $srcdir; +} + use strict; use IO::Socket; use Test::More tests => 12; diff --git a/tests/core.t b/tests/core.t index 3fb8e2b8..8ecd9b3e 100755 --- a/tests/core.t +++ b/tests/core.t @@ -1,5 +1,12 @@ #! /usr/bin/perl -w +BEGIN { + # add current source dir to the include-path + # we need this for make distcheck + (my $srcdir = $0) =~ s#/[^/]+$#/#; + unshift @INC, $srcdir; +} + use strict; use IO::Socket; use Test::More tests => 15; diff --git a/tests/mod-access.t b/tests/mod-access.t index 4c0987db..44dc6219 100755 --- a/tests/mod-access.t +++ b/tests/mod-access.t @@ -1,4 +1,10 @@ #! /usr/bin/perl -w +BEGIN { + # add current source dir to the include-path + # we need this for make distcheck + (my $srcdir = $0) =~ s#/[^/]+$#/#; + unshift @INC, $srcdir; +} use strict; use IO::Socket; diff --git a/tests/mod-auth.t b/tests/mod-auth.t index 6e7b5483..66593c05 100755 --- a/tests/mod-auth.t +++ b/tests/mod-auth.t @@ -1,4 +1,10 @@ #! /usr/bin/perl -w +BEGIN { + # add current source dir to the include-path + # we need this for make distcheck + (my $srcdir = $0) =~ s#/[^/]+$#/#; + unshift @INC, $srcdir; +} use strict; use IO::Socket; diff --git a/tests/mod-cgi.t b/tests/mod-cgi.t index 7fe3350c..763d859c 100755 --- a/tests/mod-cgi.t +++ b/tests/mod-cgi.t @@ -1,4 +1,10 @@ #! /usr/bin/perl -w +BEGIN { + # add current source dir to the include-path + # we need this for make distcheck + (my $srcdir = $0) =~ s#/[^/]+$#/#; + unshift @INC, $srcdir; +} use strict; use IO::Socket; diff --git a/tests/mod-compress.t b/tests/mod-compress.t index 72bf1f61..ce968c76 100755 --- a/tests/mod-compress.t +++ b/tests/mod-compress.t @@ -1,4 +1,10 @@ #! /usr/bin/perl -w +BEGIN { + # add current source dir to the include-path + # we need this for make distcheck + (my $srcdir = $0) =~ s#/[^/]+$#/#; + unshift @INC, $srcdir; +} use strict; use IO::Socket; diff --git a/tests/mod-fastcgi.t b/tests/mod-fastcgi.t index 6d7d8915..c578dc53 100755 --- a/tests/mod-fastcgi.t +++ b/tests/mod-fastcgi.t @@ -1,4 +1,10 @@ #! /usr/bin/perl -w +BEGIN { + # add current source dir to the include-path + # we need this for make distcheck + (my $srcdir = $0) =~ s#/[^/]+$#/#; + unshift @INC, $srcdir; +} use strict; use Test::More tests => 40; diff --git a/tests/mod-proxy.t b/tests/mod-proxy.t index a1abce16..ac1db0f3 100755 --- a/tests/mod-proxy.t +++ b/tests/mod-proxy.t @@ -1,4 +1,10 @@ #! /usr/bin/perl -w +BEGIN { + # add current source dir to the include-path + # we need this for make distcheck + (my $srcdir = $0) =~ s#/[^/]+$#/#; + unshift @INC, $srcdir; +} use strict; use IO::Socket; diff --git a/tests/mod-redirect.t b/tests/mod-redirect.t index 3fa18d2a..6b6104c8 100755 --- a/tests/mod-redirect.t +++ b/tests/mod-redirect.t @@ -1,4 +1,10 @@ #! /usr/bin/perl -w +BEGIN { + # add current source dir to the include-path + # we need this for make distcheck + (my $srcdir = $0) =~ s#/[^/]+$#/#; + unshift @INC, $srcdir; +} use strict; use IO::Socket; diff --git a/tests/mod-rewrite.t b/tests/mod-rewrite.t index a4b5d53a..668c1a36 100755 --- a/tests/mod-rewrite.t +++ b/tests/mod-rewrite.t @@ -1,4 +1,10 @@ #! /usr/bin/perl -w +BEGIN { + # add current source dir to the include-path + # we need this for make distcheck + (my $srcdir = $0) =~ s#/[^/]+$#/#; + unshift @INC, $srcdir; +} use strict; use IO::Socket; diff --git a/tests/mod-userdir.t b/tests/mod-userdir.t index 59990743..1c669942 100755 --- a/tests/mod-userdir.t +++ b/tests/mod-userdir.t @@ -1,4 +1,10 @@ #! /usr/bin/perl -w +BEGIN { + # add current source dir to the include-path + # we need this for make distcheck + (my $srcdir = $0) =~ s#/[^/]+$#/#; + unshift @INC, $srcdir; +} use strict; use IO::Socket; diff --git a/tests/request.t b/tests/request.t index 97b76437..4ee9bbca 100755 --- a/tests/request.t +++ b/tests/request.t @@ -1,4 +1,10 @@ #! /usr/bin/perl -w +BEGIN { + # add current source dir to the include-path + # we need this for make distcheck + (my $srcdir = $0) =~ s#/[^/]+$#/#; + unshift @INC, $srcdir; +} use strict; use IO::Socket; -- cgit v1.2.1