aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2003-04-03 13:42:06 +0000
committerDaniel Stenberg <daniel@haxx.se>2003-04-03 13:42:06 +0000
commit021d406f0c6df448ce7ce27e0b1cf1daf934cd0f (patch)
treeb7b674f5cbee835e92fa1aae2700f0f804c130e9 /tests
parent294569c502373fee6e0f2b47f21485ef3f7f60da (diff)
Modified how we log data to server.input, as we can't keep the file open
very much as it makes it troublesome on certain operating systems.
Diffstat (limited to 'tests')
-rw-r--r--tests/ftpserver.pl19
1 files changed, 13 insertions, 6 deletions
diff --git a/tests/ftpserver.pl b/tests/ftpserver.pl
index ff15fa0f5..6b0ca0199 100644
--- a/tests/ftpserver.pl
+++ b/tests/ftpserver.pl
@@ -23,7 +23,19 @@ open(FTPLOG, ">log/ftpd.log") ||
sub logmsg { print FTPLOG "$$: "; print FTPLOG @_; }
-sub ftpmsg { print INPUT @_; }
+sub ftpmsg {
+ # append to the server.input file
+ open(INPUT, ">>log/server.input") ||
+ logmsg "failed to open log/server.input\n";
+
+ INPUT->autoflush(1);
+ print INPUT @_;
+ close(INPUT);
+
+ # use this, open->print->close system only to make the file
+ # open as little as possible, to make the test suite run
+ # better on windows/cygwin
+}
my $verbose=0; # set to 1 for debugging
my $retrweirdo=0;
@@ -437,12 +449,7 @@ for ( $waitedpid = 0;
open(STDIN, "<&Client") || die "can't dup client to stdin";
open(STDOUT, ">&Client") || die "can't dup client to stdout";
- open(INPUT, ">log/server.input") ||
- logmsg "failed to open log/server.input\n";
-
FTPLOG->autoflush(1);
- INPUT->autoflush(1);
-
&customize(); # read test control instructions
print @welcome;