Commit 340166a9 authored by Dr. Stephen Henson's avatar Dr. Stephen Henson
Browse files

Change test recipes to use disabled()

parent 0d297b42
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -5,6 +5,7 @@ use warnings;

use File::Spec;
use OpenSSL::Test qw/:DEFAULT top_file/;
use OpenSSL::Test::Utils;

setup("test_dsa");

@@ -17,7 +18,7 @@ ok(run(test(["dsatest", "-app2_1"])), "running dsatest -app2_1");

 SKIP: {
     skip "Skipping dsa conversion test", 3
	 if run(app(["openssl","no-dsa"], stdout => undef));
	 if disabled("dsa");

     subtest 'dsa conversions -- private key' => sub {
	 tconversion("dsa", top_file("test","testdsa.pem"));
+2 −1
Original line number Diff line number Diff line
@@ -5,6 +5,7 @@ use warnings;

use File::Spec;
use OpenSSL::Test qw/:DEFAULT top_file/;
use OpenSSL::Test::Utils;

setup("test_ec");

@@ -16,7 +17,7 @@ ok(run(test(["ectest"])), "running ectest");

 SKIP: {
     skip "Skipping ec conversion test", 3
	 if run(app(["openssl","no-ec"], stdout => undef));
	 if disabled("ec");

     subtest 'ec conversions -- private key' => sub {
	 tconversion("ec", top_file("test","testec-p256.pem"));
+2 −1
Original line number Diff line number Diff line
@@ -5,6 +5,7 @@ use warnings;

use File::Spec;
use OpenSSL::Test qw/:DEFAULT top_file/;
use OpenSSL::Test::Utils;

setup("test_rsa");

@@ -16,7 +17,7 @@ ok(run(test(["rsa_test"])), "running rsatest");

 SKIP: {
     skip "Skipping rsa conversion test", 3
	 if run(app(["openssl","no-rsa"], stdout => undef));
	 if disabled("rsa");

     subtest 'rsa conversions -- private key' => sub {
	 tconversion("rsa", top_file("test","testrsa.pem"));
+2 −1
Original line number Diff line number Diff line
@@ -5,6 +5,7 @@ use warnings;

use File::Spec;
use OpenSSL::Test qw/:DEFAULT top_file/;
use OpenSSL::Test::Utils;

setup("test_gen");

@@ -21,7 +22,7 @@ close RND;

subtest "generating certificate requests" => sub {
    my @req_new;
    if (run(app(["openssl", "no-rsa"], stdout => undef))) {
    if (disabled("rsa")) {
	@req_new = ("-newkey", "dsa:".top_file("apps", "dsa512.pem"));
    } else {
	@req_new = ("-new");
+4 −6
Original line number Diff line number Diff line
@@ -7,14 +7,13 @@ use POSIX;
use File::Spec::Functions qw/catfile/;
use File::Compare qw/compare_text/;
use OpenSSL::Test qw/:DEFAULT top_dir top_file/;
use OpenSSL::Test::Utils;

setup("test_cms");

my $smdir    = top_dir("test", "smime-certs");
my $smcont   = top_file("test", "smcont.txt");
my $no_ec    = run(app(["openssl", "no-ec"], stdout => undef));
my $no_ec2m  = run(app(["openssl", "no-ec2m"], stdout => undef));
my $no_ecdh  = run(app(["openssl", "no-ecdh"], stdout => undef));
my ($no_ec, $no_ec2m, $no_zlib) = disabled qw/ec ec2m zlib/;

plan tests => 4;

@@ -442,8 +441,7 @@ subtest "CMS <=> CMS consistency tests, modified key parameters\n" => sub {
  SKIP: {
      skip("Zlib not supported: compression tests skipped",
	   scalar @smime_cms_comp_tests)
	  unless grep /ZLIB/, run(app(["openssl", "version", "-f"]),
				  capture => 1);
	  if $no_zlib;

      foreach (@smime_cms_comp_tests) {
	SKIP: {
@@ -469,7 +467,7 @@ sub check_availability {
    return "$tnam: skipped, EC disabled\n"
	if ($no_ec && $tnam =~ /ECDH/);
    return "$tnam: skipped, ECDH disabled\n"
	if ($no_ecdh && $tnam =~ /ECDH/);
	if ($no_ec && $tnam =~ /ECDH/);
    return "$tnam: skipped, EC2M disabled\n"
	if ($no_ec2m && $tnam =~ /K-283/);
    return "";
Loading