aboutsummaryrefslogtreecommitdiff
path: root/tests/runtests.pl
diff options
context:
space:
mode:
Diffstat (limited to 'tests/runtests.pl')
-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;