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;
}
sub MDTM_command {
my $testno = $_[0];
- loadtest("data/test$testno");
+ loadtest("$srcdir/data/test$testno");
logmsg "MDTM $testno\n";
sub SIZE_command {
my $testno = $_[0];
- loadtest("data/test$testno");
+ loadtest("$srcdir/data/test$testno");
logmsg "SIZE number $testno\n";
return 0;
}
- loadtest("data/test$testno");
+ loadtest("$srcdir/data/test$testno");
my @data = getpart("reply", "data");
# 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";