summaryrefslogtreecommitdiff
path: root/tests/runtests.pl
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2005-05-02 09:08:44 +0000
committerDaniel Stenberg <daniel@haxx.se>2005-05-02 09:08:44 +0000
commit6f4ff1f2bf6e5e24b366f06df50d5aa305f4ca46 (patch)
tree8a0c96234672162e74d7e4a31ea33ab1a23f4917 /tests/runtests.pl
parentd3eea61f1fb487318ec7958af491e86aa821ce8b (diff)
downloadcurl-6f4ff1f2bf6e5e24b366f06df50d5aa305f4ca46.tar.gz
When starting the ftp server, wait a few seconds to make really sure that
a pidfile for the server appears as otherwise it failed.
Diffstat (limited to 'tests/runtests.pl')
-rwxr-xr-xtests/runtests.pl17
1 files changed, 14 insertions, 3 deletions
diff --git a/tests/runtests.pl b/tests/runtests.pl
index c7f9618da..97b6c42b3 100755
--- a/tests/runtests.pl
+++ b/tests/runtests.pl
@@ -557,11 +557,22 @@ sub runftpserver {
my $ftppid = startnew($cmd);
- if(!kill(0, $ftppid)) {
+ if(!$ftppid || !kill(0, $ftppid)) {
# it is NOT alive
print "RUN: failed to start the FTP$id$nameext server!\n";
- stopservers($verbose);
- exit;
+ return -1;
+ }
+
+ # Make sure there is a pidfile present before we proceed. Because if we
+ # don't see one within a few secs, the server doesn't work. This mostly
+ # happens when the server finds out it cannot use the ipv6 protocol.
+ my $count=3;
+ while(! -f $pidfile) {
+ if(!$count--) {
+ print "RUN: failed starting FTP$id$nameext server (no pidfile)!\n";
+ return -1;
+ }
+ sleep(1);
}
if($verbose) {