aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2005-04-28 06:50:42 +0000
committerDaniel Stenberg <daniel@haxx.se>2005-04-28 06:50:42 +0000
commit51b17b299ca3aadeed9abdae27ab7859398fc944 (patch)
tree75c8d2e364df6ba7b4b39018c95557f77ced041c /tests
parent78882e46429e05c2a258a5440f06644f588cc224 (diff)
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
Diffstat (limited to 'tests')
-rwxr-xr-xtests/runtests.pl21
1 files changed, 18 insertions, 3 deletions
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;