diff options
author | Daniel Stenberg <daniel@haxx.se> | 2004-02-26 09:19:59 +0000 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2004-02-26 09:19:59 +0000 |
commit | 4427d91479d8e930ace86b42d2197b41ae01f870 (patch) | |
tree | d2c1612ff4e099e7794e8a14bcf47576a3d3df8a | |
parent | 0c03ed601369c534ec18588df55d53245ab7ae93 (diff) |
runtests.pl now provides the srcdir to the ftpserver so that it can pass
that to loadtest properly.
-rw-r--r-- | tests/ftpserver.pl | 11 | ||||
-rwxr-xr-x | tests/runtests.pl | 1 |
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"; |