81-test_cmp_cli.t: Skip tests with mock server if server cannot be started
Fixes
@@ -217,11 +217,14 @@ indir data_dir() => sub {
foreach my $server_name (@server_configurations) {
$server_name = chop_dblquot($server_name);
load_config($server_name, $server_name);
+ SKIP:
+ {
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 "Cannot start or find the started CMP mock server",
+ scalar @all_aspects unless $pid;
}
}
foreach my $aspect (@all_aspects) {
@@ -234,6 +237,7 @@ indir data_dir() => sub {
};
};
stop_mock_server($pid) if $pid;
+ }
};
};
