aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/Makefile.am6
-rw-r--r--tests/data/Makefile.am3
-rwxr-xr-xtests/runtests.pl5
3 files changed, 10 insertions, 4 deletions
diff --git a/tests/Makefile.am b/tests/Makefile.am
index f2a917ae5..f7a84439b 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -9,10 +9,12 @@ curl:
@(cd ..; make)
test:
- $(PERL) runtests.pl
+ $(MAKE) -C data test
+ srcdir=$(srcdir) $(PERL) $(srcdir)/runtests.pl
quiet-test:
- $(PERL) runtests.pl -s -a
+ $(MAKE) -C data test
+ srcdir=$(srcdir) $(PERL) $(srcdir)/runtests.pl -s -a
clean:
rm -rf log
diff --git a/tests/data/Makefile.am b/tests/data/Makefile.am
index a34468676..82448af55 100644
--- a/tests/data/Makefile.am
+++ b/tests/data/Makefile.am
@@ -1,6 +1,9 @@
all:
install:
+test:
+ [ -f command1.txt ] || ln -s $(srcdir)/*.txt .
+
EXTRA_DIST = command1.txt error113.txt name17.txt prot8.txt \
command10.txt error114.txt name18.txt prot9.txt \
command100.txt error115.txt name19.txt reply1.txt \
diff --git a/tests/runtests.pl b/tests/runtests.pl
index deb9311fa..86df18fb1 100755
--- a/tests/runtests.pl
+++ b/tests/runtests.pl
@@ -8,6 +8,7 @@
use strict;
+my $srcdir = $ENV{'srcdir'} || '.';
my $HOSTIP="127.0.0.1";
my $HOSTPORT=8999; # bad name, but this is the HTTP server port
my $FTPPORT=8921; # this is the FTP server port
@@ -108,7 +109,7 @@ sub runhttpserver {
}
if ($RUNNING != 1) {
- system("perl ./httpserver.pl $HOSTPORT &");
+ system("perl $srcdir/httpserver.pl $HOSTPORT &");
sleep 1; # give it a little time to start
}
else {
@@ -149,7 +150,7 @@ sub runftpserver {
}
if ($RUNNING != 1) {
- system("perl ./ftpserver.pl $FTPPORT &");
+ system("perl $srcdir/ftpserver.pl $FTPPORT &");
sleep 1; # give it a little time to start
}
else {