<file name="log/filename">
the file's contents must be identical to this
</file>
+<stripfile>
+One perl op per line that operates on the file before being compared. This is
+pretty advanced. Example: "s/^EPRT .*/EPRT stripped/"
+</stripfile>
<upload>
the contents of the upload data curl should have sent
</upload>
my $TESTDIR="$srcdir/data";
my $LIBDIR="./libtest";
my $SERVERIN="$LOGDIR/server.input"; # what curl sent the server
+my $SERVER2IN="$LOGDIR/server2.input"; # what curl sent the second server
my $CURLLOG="$LOGDIR/curl.log"; # all command lines run
my $FTPDCMD="$LOGDIR/ftpserver.cmd"; # copy ftp server instructions here
}
my $verified;
- for(1 .. 10) {
+ for(1 .. 30) {
# verify that our server is up and running:
my $data=`$CURL --silent -g \"$ip:$port/verifiedserver\" 2>/dev/null`;
}
else {
if($verbose) {
- print STDERR "RUN: Retrying HTTP$nameext server existence in 3 sec\n";
+ print STDERR "RUN: Retrying HTTP$nameext server existence in 1 sec\n";
}
- sleep(3);
+ sleep(1);
next;
}
}
}
sleep(1);
- for(1 .. 10) {
+ for(1 .. 30) {
$pid=checkserver($HTTPSPIDFILE);
if($pid <= 0) {
if($verbose) {
- print STDERR "RUN: waiting 3 sec for HTTPS server\n";
+ print STDERR "RUN: waiting one sec for HTTPS server\n";
}
- sleep(3);
+ sleep(1);
}
else {
last;
my $verified;
$pid = 0;
- for(1 .. 10) {
+ for(1 .. 30) {
# verify that our server is up and running:
my $line;
my $cmd="$CURL --silent ftp://$HOSTIP:$port/verifiedserver 2>/dev/null";
}
if(!$pid) {
if($verbose) {
- print STDERR "RUN: Retrying FTP$id server existence in 3 sec\n";
+ print STDERR "RUN: Retrying FTP$id server existence in a sec\n";
}
- sleep(3);
+ sleep(1);
next;
}
else {
}
sleep(1);
- for(1 .. 10) {
+ for(1 .. 30) {
$pid=checkserver($FTPSPIDFILE );
if($pid <= 0) {
if($verbose) {
- print STDERR "RUN: waiting 3 sec for FTPS server\n";
+ print STDERR "RUN: waiting one sec for FTPS server\n";
}
- sleep(3);
+ sleep(1);
}
else {
last;
chomp $tool;
}
- # remove previous server output logfile
+ # remove server output logfiles
unlink($SERVERIN);
+ unlink($SERVER2IN);
if(@ftpservercmd) {
# write the instructions to file
}
my @generated=loadarray($filename);
+ # what parts to cut off from the file
+ my @stripfile = getpart("verify", "stripfile");
+ my $strip;
+ for $strip (@stripfile) {
+ chomp $strip;
+ for(@generated) {
+ eval $strip;
+ }
+ }
+
$res = compare("output", \@generated, \@outfile);
if($res) {
return 1;