mirror of
https://github.com/moparisthebest/curl
synced 2025-03-11 07:39:50 -04:00
support the new <killserver> tag
This commit is contained in:
parent
d37031f14e
commit
16ddb09cb4
@ -83,6 +83,8 @@ my $listonly; # only list the tests
|
|||||||
|
|
||||||
my $pwd; # current working directory
|
my $pwd; # current working directory
|
||||||
|
|
||||||
|
my %run; # running server
|
||||||
|
|
||||||
chomp($pwd = `pwd`);
|
chomp($pwd = `pwd`);
|
||||||
|
|
||||||
# enable memory debugging if curl is compiled with it
|
# enable memory debugging if curl is compiled with it
|
||||||
@ -202,7 +204,7 @@ sub runhttpserver {
|
|||||||
# verify that our server is up and running:
|
# verify that our server is up and running:
|
||||||
my $data=`$CURL --silent -i $HOSTIP:$HOSTPORT/verifiedserver 2>/dev/null`;
|
my $data=`$CURL --silent -i $HOSTIP:$HOSTPORT/verifiedserver 2>/dev/null`;
|
||||||
|
|
||||||
if ( $data !~ /WE ROOLZ/ ) {
|
if ( $data !~ /WE ROOLZ: (\d+)/ ) {
|
||||||
sleep(1);
|
sleep(1);
|
||||||
next;
|
next;
|
||||||
}
|
}
|
||||||
@ -308,7 +310,10 @@ sub runftpserver {
|
|||||||
# verify that our server is up and running:
|
# verify that our server is up and running:
|
||||||
my $data=`$CURL --silent -i ftp://$HOSTIP:$FTPPORT/verifiedserver 2>/dev/null`;
|
my $data=`$CURL --silent -i ftp://$HOSTIP:$FTPPORT/verifiedserver 2>/dev/null`;
|
||||||
|
|
||||||
if ( $data !~ /WE ROOLZ/ ) {
|
if ( $data !~ /WE ROOLZ: (\d+)/ ) {
|
||||||
|
if($verbose) {
|
||||||
|
print STDERR "RUN: Retrying FTP server existance in 1 sec\n";
|
||||||
|
}
|
||||||
sleep(1);
|
sleep(1);
|
||||||
next;
|
next;
|
||||||
}
|
}
|
||||||
@ -839,6 +844,19 @@ sub singletest {
|
|||||||
|
|
||||||
unlink($FTPDCMD); # remove the instructions for this test
|
unlink($FTPDCMD); # remove the instructions for this test
|
||||||
|
|
||||||
|
my @what = getpart("client", "killserver");
|
||||||
|
for(@what) {
|
||||||
|
my $serv = $_;
|
||||||
|
chomp $serv;
|
||||||
|
if($run{$serv}) {
|
||||||
|
stopserver($run{$serv}); # the pid file is in the hash table
|
||||||
|
$run{$serv}=""; # clear it
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
print STDERR "RUN: The $serv server is not running\n";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if($memory_debug) {
|
if($memory_debug) {
|
||||||
if(! -f $memdump) {
|
if(! -f $memdump) {
|
||||||
print "\n** ALERT! memory debuggin without any output file?\n";
|
print "\n** ALERT! memory debuggin without any output file?\n";
|
||||||
@ -873,8 +891,6 @@ sub singletest {
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
my %run;
|
|
||||||
|
|
||||||
##############################################################################
|
##############################################################################
|
||||||
# This function makes sure the right set of server is running for the
|
# This function makes sure the right set of server is running for the
|
||||||
# specified test case. This is a useful design when we run single tests as not
|
# specified test case. This is a useful design when we run single tests as not
|
||||||
|
Loading…
x
Reference in New Issue
Block a user