diff options
author | Matt Caswell <matt@openssl.org> | 2020-04-07 16:22:49 +0100 |
---|---|---|
committer | Matt Caswell <matt@openssl.org> | 2020-04-20 11:25:56 +0100 |
commit | ab5a02f70726e28b3c39391aac29a4aedb080ea3 (patch) | |
tree | 368badd16c3f6ed604b3baabe8ccc18518a301f0 /test/recipes/80-test_ssl_new.t | |
parent | fea4e2bd36584cebb79f45680c6da0c14fde3d1e (diff) |
Teach ssl_test_new to have different tests for different loaded providers
We now run the tests twice: Once with no specific providers loaded and
just using the default libctx, and a second time with a non-default libctx
and the default provider.
In the second run we disable tests which use a PSS cert/key because we
don't yet have support for that.
Reviewed-by: Shane Lontis <shane.lontis@oracle.com>
(Merged from https://github.com/openssl/openssl/pull/11511)
Diffstat (limited to 'test/recipes/80-test_ssl_new.t')
-rw-r--r-- | test/recipes/80-test_ssl_new.t | 18 |
1 files changed, 11 insertions, 7 deletions
diff --git a/test/recipes/80-test_ssl_new.t b/test/recipes/80-test_ssl_new.t index 5ee872557d..6d6fa5cae3 100644 --- a/test/recipes/80-test_ssl_new.t +++ b/test/recipes/80-test_ssl_new.t @@ -108,26 +108,30 @@ my %skip = ( foreach my $conf (@conf_files) { subtest "Test configuration $conf" => sub { + plan tests => 6; test_conf($conf, $conf_dependent_tests{$conf} || $^O eq "VMS" ? 0 : 1, - defined($skip{$conf}) ? $skip{$conf} : $no_tls); + defined($skip{$conf}) ? $skip{$conf} : $no_tls, + "none"); + test_conf($conf, + 0, + defined($skip{$conf}) ? $skip{$conf} : $no_tls, + "default"); } } sub test_conf { - plan tests => 3; - - my ($conf, $check_source, $skip) = @_; + my ($conf, $check_source, $skip, $provider) = @_; my $conf_file = srctop_file("test", "ssl-tests", $conf); my $input_file = $conf_file . ".in"; - my $output_file = $conf; + my $output_file = $conf . "." . $provider; my $run_test = 1; SKIP: { # "Test" 1. Generate the source. skip 'failure', 2 unless - ok(run(perltest(["generate_ssl_tests.pl", $input_file], + ok(run(perltest(["generate_ssl_tests.pl", $input_file, $provider], interpreter_args => [ "-I", srctop_dir("util", "perl")], stdout => $output_file)), "Getting output from generate_ssl_tests.pl."); @@ -145,7 +149,7 @@ sub test_conf { skip "No tests available; skipping tests", 1 if $skip; skip "Stale sources; skipping tests", 1 if !$run_test; - ok(run(test(["ssl_test", $output_file, "default"])), + ok(run(test(["ssl_test", $output_file, $provider])), "running ssl_test $conf"); } } |