aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--tests/ftpserver.pl11
-rwxr-xr-xtests/runtests.pl1
2 files changed, 9 insertions, 3 deletions
diff --git a/tests/ftpserver.pl b/tests/ftpserver.pl
index b4442c68f..064d9498f 100644
--- a/tests/ftpserver.pl
+++ b/tests/ftpserver.pl
@@ -39,12 +39,17 @@ sub ftpmsg {
my $verbose=0; # set to 1 for debugging
my $retrweirdo=0;
my $retrnosize=0;
+my $srcdir=".";
my $port = 8921; # just a default
do {
if($ARGV[0] eq "-v") {
$verbose=1;
}
+ elsif($ARGV[0] eq "-s") {
+ $srcdir=$ARGV[1];
+ shift @ARGV;
+ }
elsif($ARGV[0] =~ /^(\d+)$/) {
$port = $1;
}
@@ -185,7 +190,7 @@ sub NLST_command {
sub MDTM_command {
my $testno = $_[0];
- loadtest("data/test$testno");
+ loadtest("$srcdir/data/test$testno");
logmsg "MDTM $testno\n";
@@ -212,7 +217,7 @@ sub MDTM_command {
sub SIZE_command {
my $testno = $_[0];
- loadtest("data/test$testno");
+ loadtest("$srcdir/data/test$testno");
logmsg "SIZE number $testno\n";
@@ -267,7 +272,7 @@ sub RETR_command {
return 0;
}
- loadtest("data/test$testno");
+ loadtest("$srcdir/data/test$testno");
my @data = getpart("reply", "data");
diff --git a/tests/runtests.pl b/tests/runtests.pl
index 944418d2d..c0de46318 100755
--- a/tests/runtests.pl
+++ b/tests/runtests.pl
@@ -489,6 +489,7 @@ sub runftpserver {
# now (re-)start our server:
my $flag=$debugprotocol?"-v ":"";
+ $flag .= "-s \"$srcdir\"";
my $cmd="$perl $srcdir/ftpserver.pl $flag $FTPPORT &";
if($verbose) {
print "CMD: $cmd\n";