1
0
mirror of https://github.com/moparisthebest/curl synced 2024-12-21 23:58:49 -05:00

runtests.pl now provides the srcdir to the ftpserver so that it can pass

that to loadtest properly.
This commit is contained in:
Daniel Stenberg 2004-02-26 09:19:59 +00:00
parent 0c03ed6013
commit 4427d91479
2 changed files with 9 additions and 3 deletions

View File

@ -39,12 +39,17 @@ sub ftpmsg {
my $verbose=0; # set to 1 for debugging my $verbose=0; # set to 1 for debugging
my $retrweirdo=0; my $retrweirdo=0;
my $retrnosize=0; my $retrnosize=0;
my $srcdir=".";
my $port = 8921; # just a default my $port = 8921; # just a default
do { do {
if($ARGV[0] eq "-v") { if($ARGV[0] eq "-v") {
$verbose=1; $verbose=1;
} }
elsif($ARGV[0] eq "-s") {
$srcdir=$ARGV[1];
shift @ARGV;
}
elsif($ARGV[0] =~ /^(\d+)$/) { elsif($ARGV[0] =~ /^(\d+)$/) {
$port = $1; $port = $1;
} }
@ -185,7 +190,7 @@ sub NLST_command {
sub MDTM_command { sub MDTM_command {
my $testno = $_[0]; my $testno = $_[0];
loadtest("data/test$testno"); loadtest("$srcdir/data/test$testno");
logmsg "MDTM $testno\n"; logmsg "MDTM $testno\n";
@ -212,7 +217,7 @@ sub MDTM_command {
sub SIZE_command { sub SIZE_command {
my $testno = $_[0]; my $testno = $_[0];
loadtest("data/test$testno"); loadtest("$srcdir/data/test$testno");
logmsg "SIZE number $testno\n"; logmsg "SIZE number $testno\n";
@ -267,7 +272,7 @@ sub RETR_command {
return 0; return 0;
} }
loadtest("data/test$testno"); loadtest("$srcdir/data/test$testno");
my @data = getpart("reply", "data"); my @data = getpart("reply", "data");

View File

@ -489,6 +489,7 @@ sub runftpserver {
# now (re-)start our server: # now (re-)start our server:
my $flag=$debugprotocol?"-v ":""; my $flag=$debugprotocol?"-v ":"";
$flag .= "-s \"$srcdir\"";
my $cmd="$perl $srcdir/ftpserver.pl $flag $FTPPORT &"; my $cmd="$perl $srcdir/ftpserver.pl $flag $FTPPORT &";
if($verbose) { if($verbose) {
print "CMD: $cmd\n"; print "CMD: $cmd\n";