check for the HTTPS server in a manner similar to how we check for the HTTP
authorDaniel Stenberg <daniel@haxx.se>
Wed, 16 Mar 2005 22:02:09 +0000 (22:02 +0000)
committerDaniel Stenberg <daniel@haxx.se>
Wed, 16 Mar 2005 22:02:09 +0000 (22:02 +0000)
server

tests/runtests.pl

index 35b4ddd..e1b9bd7 100755 (executable)
@@ -477,20 +477,24 @@ sub runhttpsserver {
     if($verbose) {
         print "CMD: $cmd\n";
     }
-    sleep(1);
 
     for(1 .. 30) {
-        $pid=checkserver($HTTPSPIDFILE);
-
-        if($pid <= 0) {
-            if($verbose) {
-                print STDERR "RUN: waiting one sec for HTTPS server\n";
-            }
-            sleep(1);
+        # verify that our HTTPS server is up and running:
+        $cmd="$CURL --silent --insecure \"https://$HOSTIP:$HTTPSPORT/verifiedserver\" 2>/dev/null";
+        if($verbose) {
+            print "CMD: $cmd\n";
         }
-        else {
+
+        my $data=`$cmd`;
+
+        if ( $data =~ /WE ROOLZ: (\d+)/ ) {
+            $pid = 0+$1;
             last;
         }
+        if($verbose) {
+            print STDERR "RUN: waiting one sec for HTTPS server\n";
+        }
+        sleep(1);
     }
 
     return $pid;