Fix Custom Extension tests skip count
[openssl.git] / test / recipes / 80-test_ssl.t
index 54259e1b2c48cc05644526f4c9986aff8d96bc6e..bcac431995045748c91ccedc81d85fc16e85da3e 100644 (file)
@@ -14,11 +14,11 @@ setup("test_ssl");
 my ($no_rsa, $no_dsa, $no_dh, $no_ec, $no_srp, $no_psk,
     $no_ssl3, $no_tls1, $no_tls1_1, $no_tls1_2,
     $no_dtls, $no_dtls1, $no_dtls1_2) =
-    disabled qw/rsa dsa dh ec srp psk
-                ssl3 tls1 tls1_1 tls1_2
-                dtls dtls1 dtls1_2/;
-my $no_anytls = $no_ssl3 && $no_tls1 && $no_tls1_1 && $no_tls1_2;
-my $no_anydtls = $no_dtls && $no_dtls1 && $no_dtls1_2;
+    anydisabled qw/rsa dsa dh ec srp psk
+                   ssl3 tls1 tls1_1 tls1_2
+                   dtls dtls1 dtls1_2/;
+my $no_anytls = alldisabled(available_protocols("tls"));
+my $no_anydtls = alldisabled(available_protocols("dtls"));
 
 plan skip_all => "No SSL/TLS/DTLS protocol is support by this OpenSSL build"
     if $no_anytls && $no_anydtls;
@@ -560,7 +560,7 @@ sub testssl {
        plan tests => 1;
 
       SKIP: {
-         skip "TLSv1.0 is not supported by this OpenSSL build", 7
+         skip "TLSv1.0 is not supported by this OpenSSL build", 1
              if $no_tls1;
 
          ok(run(test([@ssltest, "-bio_pair", "-tls1", "-custom_ext"])),
@@ -657,6 +657,7 @@ sub testssl {
         my $n = ((@protos+2) * (@protos+3))/2 - 2;
         my $ntests = $n * $n;
        plan tests => $ntests;
+      SKIP: {
         skip "TLS disabled", 1 if $ntests == 1;
 
         my $should;
@@ -690,7 +691,7 @@ sub testssl {
                 print STDERR "\nFailed: @args\n";
             }
             ok($ok);
-        }}}}
+        }}}}}
     };
 
     subtest 'DTLS Version min/max tests' => sub {
@@ -703,6 +704,7 @@ sub testssl {
         my $n = ((@protos+2) * (@protos+3))/2 - 2;
         my $ntests = $n * $n;
        plan tests => $ntests;
+      SKIP: {
         skip "DTLS disabled", 1 if $ntests == 1;
 
         my $should;
@@ -736,7 +738,7 @@ sub testssl {
                 print STDERR "\nFailed: @args\n";
             }
             ok($ok);
-        }}}}
+        }}}}}
     };
 }