use lib bldtop_dir('.');
plan skip_all => "These tests are not supported in a fuzz build"
- if config('options') =~ /-DFUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION/;
+ if config('options') =~ /-DFUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION|enable-fuzz-afl/;
plan skip_all => "These tests are not supported in a no-cmp build"
if disabled("cmp");
plan skip_all => "These tests are not supported in a no-ec build"
if disabled("ec");
-plan skip_all => "Tests involving local HTTP server not available on Windows or VMS"
- if $^O =~ /^(VMS|MSWin32)$/;
+plan skip_all => "Tests involving local HTTP server not available on Windows, AIX or VMS"
+ if $^O =~ /^(VMS|MSWin32|AIX)$/;
plan skip_all => "Tests involving local HTTP server not available in cross-compile builds"
if defined $ENV{EXE_SHELL};
plan skip_all => "Tests involving local HTTP server require 'kill' command"
- if system("which kill");
+ if system("which kill >/dev/null");
plan skip_all => "Tests involving local HTTP server require 'lsof' command"
- if system("which lsof"); # this typically excludes Solaris
+ if system("which lsof >/dev/null"); # this typically excludes Solaris
sub chop_dblquot { # chop any leading and trailing '"' (needed for Windows)
my $str = shift;
$server_name = chop_dblquot($server_name);
load_config($server_name, $server_name);
{
+ SKIP: {
my $pid;
if ($server_name eq "Mock") {
indir "Mock" => sub {
};
};
stop_mock_server($pid) if $pid;
+ }
}
};
};
my $cmd = "LD_LIBRARY_PATH=$dir DYLD_LIBRARY_PATH=$dir " .
bldtop_dir($app) . " -config server.cnf $args";
my $pid = mock_server_pid();
- return $pid if $pid; # already running
+ if ($pid) {
+ print "Mock server already running with pid=$pid\n";
+ return $pid;
+ }
+ print "Current directory is ".getcwd()."\n";
+ print "Launching mock server listening on port $server_port: $cmd\n";
return system("$cmd &") == 0 # start in background, check for success
? (sleep 1, mock_server_pid()) : 0;
}
sub stop_mock_server {
my $pid = $_[0];
+ print "Killing mock server with pid=$pid\n";
system("kill $pid") if $pid;
}