summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDr. David von Oheimb <David.von.Oheimb@siemens.com>2020-07-27 08:50:27 +0200
committerDr. David von Oheimb <David.von.Oheimb@siemens.com>2020-08-03 08:31:32 +0200
commita677190779705d243cca88ae04f2105dee52672d (patch)
treecb1b83c32989fcad42c85f0385ab829d99defbad
parent0f9fdefeb05768b86f4364a8e976c87ee197638e (diff)
81-test_cmp_cli.t: Skip tests with mock server if server cannot be started
Fixes #12514 Reviewed-by: Paul Dale <paul.dale@oracle.com> (Merged from https://github.com/openssl/openssl/pull/12537)
-rw-r--r--test/recipes/81-test_cmp_cli.t34
1 files changed, 19 insertions, 15 deletions
diff --git a/test/recipes/81-test_cmp_cli.t b/test/recipes/81-test_cmp_cli.t
index 51b4baf6a5..8c4f0f920a 100644
--- a/test/recipes/81-test_cmp_cli.t
+++ b/test/recipes/81-test_cmp_cli.t
@@ -217,23 +217,27 @@ indir data_dir() => sub {
foreach my $server_name (@server_configurations) {
$server_name = chop_dblquot($server_name);
load_config($server_name, $server_name);
- my $pid;
- if ($server_name eq "Mock") {
- indir "Mock" => sub {
- $pid = start_mock_server("");
- die "Cannot start or find the started CMP mock server" unless $pid;
+ SKIP:
+ {
+ my $pid;
+ if ($server_name eq "Mock") {
+ indir "Mock" => sub {
+ $pid = start_mock_server("");
+ skip "Cannot start or find the started CMP mock server",
+ scalar @all_aspects unless $pid;
+ }
}
- }
- foreach my $aspect (@all_aspects) {
- $aspect = chop_dblquot($aspect);
- next if $server_name eq "Mock" && $aspect eq "certstatus";
- load_config($server_name, $aspect); # update with any aspect-specific settings
- indir $server_name => sub {
- my $tests = load_tests($server_name, $aspect);
- test_cmp_cli_aspect($server_name, $aspect, $tests);
+ foreach my $aspect (@all_aspects) {
+ $aspect = chop_dblquot($aspect);
+ next if $server_name eq "Mock" && $aspect eq "certstatus";
+ load_config($server_name, $aspect); # update with any aspect-specific settings
+ indir $server_name => sub {
+ my $tests = load_tests($server_name, $aspect);
+ test_cmp_cli_aspect($server_name, $aspect, $tests);
+ };
};
- };
- stop_mock_server($pid) if $pid;
+ stop_mock_server($pid) if $pid;
+ }
};
};