mirror of
https://github.com/openssl/openssl.git
synced 2025-04-06 20:20:50 +08:00
80-test_cmp_http.t: Add diagnostic info on starting/stopping mock server
Reviewed-by: Tomas Mraz <tomas@openssl.org> (Merged from https://github.com/openssl/openssl/pull/14630)
This commit is contained in:
parent
e1428c62a1
commit
f7c4d86228
@ -273,12 +273,17 @@ sub start_mock_server {
|
||||
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 "Launching mock server: $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;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user