From 51b17b299ca3aadeed9abdae27ab7859398fc944 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Thu, 28 Apr 2005 06:50:42 +0000 Subject: 1. no longer ask the server for the HTTPS pid, as it returns the HTTP pid (problem identified by Dan F) 2. initial text mode fix for file checks, to allow better text file testing on windows (with regard to line endings) 3. fixed to use the proper ftpserver pidfile to find pid --- tests/runtests.pl | 21 ++++++++++++++++++--- 1 file changed, 18 insertions(+), 3 deletions(-) (limited to 'tests') diff --git a/tests/runtests.pl b/tests/runtests.pl index 49963259d..767f7a0df 100755 --- a/tests/runtests.pl +++ b/tests/runtests.pl @@ -469,7 +469,7 @@ sub runhttpsserver { return 0; } - my $pid=checkserver($HTTPSPIDFILE ); + my $pid=checkserver($HTTPSPIDFILE); if($pid > 0) { # kill previous stunnel! @@ -496,7 +496,13 @@ sub runhttpsserver { my $data=`$cmd`; if ( $data =~ /WE ROOLZ: (\d+)/ ) { - $pid = 0+$1; + # The replying server is the HTTP (_not_ HTTPS) server, so the + # pid it returns is of course not the pid we want here. We extract + # the pid from the fresh pid file instead. + $pid=checkserver($HTTPSPIDFILE); + if($verbose) { + print STDERR "RUN: extracted pid $pid from $HTTPSPIDFILE\n"; + } last; } if($verbose) { @@ -532,7 +538,7 @@ sub runftpserver { $nameext="-ipv6"; } - my $pid = checkserver (); + my $pid = checkserver($pidfile); if ($pid <= 0) { print "RUN: Check port $port for the FTP$id$nameext server\n" @@ -1434,10 +1440,19 @@ sub singletest { print "ERROR: section verify=>file has no name attribute!\n"; exit; } + my $filemode=$hash{'mode'}; + my @generated=loadarray($filename); # what parts to cut off from the file my @stripfile = getpart("verify", "stripfile"); + + if(($filemode eq "text") && ($^O eq 'MSWin32')) { + # text mode when running on windows means adding an extra + # strip expression + push @stripfile, "s/\r\n/\n/"; + } + my $strip; for $strip (@stripfile) { chomp $strip; -- cgit v1.2.3