mirror of
https://github.com/MariaDB/server.git
synced 2025-07-29 05:21:33 +03:00
Add mtr_verbose to print more verbose output when --verbose flag is used
This commit is contained in:
@ -661,14 +661,13 @@ sub mtr_wait_blocking($) {
|
|||||||
# Return if no processes defined
|
# Return if no processes defined
|
||||||
return if ! %$admin_pids;
|
return if ! %$admin_pids;
|
||||||
|
|
||||||
# mtr_report("mtr_wait_blocking");
|
mtr_verbose("mtr_wait_blocking");
|
||||||
|
|
||||||
# Wait for all the started processes to exit
|
# Wait for all the started processes to exit
|
||||||
# As mysqladmin is such a simple program, we trust it to terminate itself.
|
# As mysqladmin is such a simple program, we trust it to terminate itself.
|
||||||
# I.e. we wait blocking, and wait wait for them all before we go on.
|
# I.e. we wait blocking, and wait wait for them all before we go on.
|
||||||
foreach my $pid (keys %{$admin_pids})
|
foreach my $pid (keys %{$admin_pids})
|
||||||
{
|
{
|
||||||
# mtr_report("pid: $pid");
|
|
||||||
my $ret_pid= waitpid($pid,0);
|
my $ret_pid= waitpid($pid,0);
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -708,7 +707,7 @@ sub mtr_mysqladmin_start($$$) {
|
|||||||
my $pid= mtr_spawn($::exe_mysqladmin, $args,
|
my $pid= mtr_spawn($::exe_mysqladmin, $args,
|
||||||
"", $path_mysqladmin_log, $path_mysqladmin_log, "",
|
"", $path_mysqladmin_log, $path_mysqladmin_log, "",
|
||||||
{ append_log_file => 1 });
|
{ append_log_file => 1 });
|
||||||
# mtr_report("mtr_mysqladmin_start, pid: $pid");
|
mtr_verbose("mtr_mysqladmin_start, pid: $pid");
|
||||||
return $pid;
|
return $pid;
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -733,7 +732,7 @@ sub mtr_ndbmgm_start($$) {
|
|||||||
my $pid= mtr_spawn($::exe_ndb_mgm, $args,
|
my $pid= mtr_spawn($::exe_ndb_mgm, $args,
|
||||||
"", "/dev/null", "/dev/null", "",
|
"", "/dev/null", "/dev/null", "",
|
||||||
{});
|
{});
|
||||||
# mtr_report("mtr_ndbmgm_start, pid: $pid");
|
mtr_verbose("mtr_ndbmgm_start, pid: $pid");
|
||||||
return $pid;
|
return $pid;
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -926,7 +925,7 @@ sub sleep_until_file_created ($$$) {
|
|||||||
|
|
||||||
sub mtr_kill_processes ($) {
|
sub mtr_kill_processes ($) {
|
||||||
my $pids = shift;
|
my $pids = shift;
|
||||||
# mtr_report("mtr_kill_processes " . join(" ", @$pids));
|
mtr_verbose("mtr_kill_processes " . join(" ", @$pids));
|
||||||
foreach my $sig (15, 9)
|
foreach my $sig (15, 9)
|
||||||
{
|
{
|
||||||
my $retries= 10;
|
my $retries= 10;
|
||||||
|
@ -21,6 +21,7 @@ sub mtr_warning (@);
|
|||||||
sub mtr_error (@);
|
sub mtr_error (@);
|
||||||
sub mtr_child_error (@);
|
sub mtr_child_error (@);
|
||||||
sub mtr_debug (@);
|
sub mtr_debug (@);
|
||||||
|
sub mtr_verbose (@);
|
||||||
|
|
||||||
|
|
||||||
##############################################################################
|
##############################################################################
|
||||||
@ -342,5 +343,11 @@ sub mtr_debug (@) {
|
|||||||
print STDERR "####: ",join(" ", @_),"\n";
|
print STDERR "####: ",join(" ", @_),"\n";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
sub mtr_verbose (@) {
|
||||||
|
if ( $::opt_verbose )
|
||||||
|
{
|
||||||
|
print STDERR "> ",join(" ", @_),"\n";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
1;
|
1;
|
||||||
|
@ -168,6 +168,7 @@ our $opt_suite;
|
|||||||
our $opt_netware;
|
our $opt_netware;
|
||||||
|
|
||||||
our $opt_script_debug= 0; # Script debugging, enable with --script-debug
|
our $opt_script_debug= 0; # Script debugging, enable with --script-debug
|
||||||
|
our $opt_verbose= 1; # Verbose output, enable with --verbose
|
||||||
|
|
||||||
# Options FIXME not all....
|
# Options FIXME not all....
|
||||||
|
|
||||||
@ -656,6 +657,7 @@ sub command_line_setup () {
|
|||||||
'old-master' => \$opt_old_master,
|
'old-master' => \$opt_old_master,
|
||||||
'reorder' => \$opt_reorder,
|
'reorder' => \$opt_reorder,
|
||||||
'script-debug' => \$opt_script_debug,
|
'script-debug' => \$opt_script_debug,
|
||||||
|
'verbose' => \$opt_verbose,
|
||||||
'sleep=i' => \$opt_sleep,
|
'sleep=i' => \$opt_sleep,
|
||||||
'socket=s' => \$opt_socket,
|
'socket=s' => \$opt_socket,
|
||||||
'start-dirty' => \$opt_start_dirty,
|
'start-dirty' => \$opt_start_dirty,
|
||||||
@ -1635,7 +1637,7 @@ sub ndbcluster_wait_started($){
|
|||||||
"--ndb-connectstring=$cluster->{'connect_string'}",
|
"--ndb-connectstring=$cluster->{'connect_string'}",
|
||||||
"--timeout=60"],
|
"--timeout=60"],
|
||||||
"", $path_waiter_log, $path_waiter_log, "");
|
"", $path_waiter_log, $path_waiter_log, "");
|
||||||
# mtr_report("ndbcluster_wait_started, returns: $res") if $res;
|
mtr_verbose("ndbcluster_wait_started, returns: $res") if $res;
|
||||||
return $res;
|
return $res;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1662,7 +1664,7 @@ sub ndb_mgmd_start ($) {
|
|||||||
|
|
||||||
# Remember pid of ndb_mgmd
|
# Remember pid of ndb_mgmd
|
||||||
$cluster->{'pid'}= $pid;
|
$cluster->{'pid'}= $pid;
|
||||||
# mtr_report("ndb_mgmd_start, pid: $pid");
|
mtr_verbose("ndb_mgmd_start, pid: $pid");
|
||||||
return $pid;
|
return $pid;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1694,7 +1696,7 @@ sub ndbd_start ($$$) {
|
|||||||
# Add pid to list of pids for this cluster
|
# Add pid to list of pids for this cluster
|
||||||
$cluster->{'ndbds'}->[$idx]->{'pid'}= $pid;
|
$cluster->{'ndbds'}->[$idx]->{'pid'}= $pid;
|
||||||
|
|
||||||
# mtr_report("ndbd_start, pid: $pid");
|
mtr_verbose("ndbd_start, pid: $pid");
|
||||||
|
|
||||||
return $pid;
|
return $pid;
|
||||||
}
|
}
|
||||||
@ -1704,7 +1706,7 @@ sub ndbcluster_start ($$) {
|
|||||||
my $cluster= shift;
|
my $cluster= shift;
|
||||||
my $extra_args= shift;
|
my $extra_args= shift;
|
||||||
|
|
||||||
# mtr_report("ndbcluster_start '$cluster->{'name'}'");
|
mtr_verbose("ndbcluster_start '$cluster->{'name'}'");
|
||||||
|
|
||||||
if ( $glob_use_running_ndbcluster )
|
if ( $glob_use_running_ndbcluster )
|
||||||
{
|
{
|
||||||
@ -2806,7 +2808,7 @@ sub mysqld_start ($$$) {
|
|||||||
|
|
||||||
# Remember pid of the started process
|
# Remember pid of the started process
|
||||||
$mysqld->{'pid'}= $pid;
|
$mysqld->{'pid'}= $pid;
|
||||||
# mtr_report("mysqld pid: $pid");
|
mtr_verbose("mysqld pid: $pid");
|
||||||
return $pid;
|
return $pid;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -3948,6 +3950,7 @@ Misc options
|
|||||||
comment=STR Write STR to the output
|
comment=STR Write STR to the output
|
||||||
notimer Don't show test case execution time
|
notimer Don't show test case execution time
|
||||||
script-debug Debug this script itself
|
script-debug Debug this script itself
|
||||||
|
verbose More verbose output
|
||||||
start-and-exit Only initialize and start the servers, using the
|
start-and-exit Only initialize and start the servers, using the
|
||||||
startup settings for the specified test case (if any)
|
startup settings for the specified test case (if any)
|
||||||
start-dirty Only start the servers (without initialization) for
|
start-dirty Only start the servers (without initialization) for
|
||||||
|
Reference in New Issue
Block a user