Have 70-test_clienthello.t be selective on when it can be run
authorRichard Levitte <levitte@openssl.org>
Wed, 3 Feb 2016 23:24:16 +0000 (00:24 +0100)
committerRichard Levitte <levitte@openssl.org>
Thu, 4 Feb 2016 09:55:38 +0000 (10:55 +0100)
The test program clienthello checks TLS extensions, so there's no
point running it when no TLS protocol is available.

Reviewed-by: Ben Laurie <ben@openssl.org>
test/recipes/70-test_clienthello.t

index 73b83f2e5fd50a91c6f6ce1710de4d8c9db6cd63..2032d6d2f2da100ac9503fe17c2bc62f0ceeeb58 100644 (file)
@@ -1,5 +1,13 @@
 #! /usr/bin/perl
 
-use OpenSSL::Test::Simple;
+use OpenSSL::Test;
+use OpenSSL::Test::Utils;
 
-simple_test("test_clienthello", "clienthellotest");
+setup("test_clienthello");
+
+plan skip_all => "No TLS/SSL protocols are supported by this OpenSSL build"
+    if alldisabled(grep { $_ ne "ssl3" } available_protocols("tls"));
+
+plan tests => 1;
+
+ok(run(test(["clienthellotest"])), "running clienthellotest");