Cleanup formatting

parent 7f1d1586
...@@ -1278,3 +1278,6 @@ include/openssl ...@@ -1278,3 +1278,6 @@ include/openssl
mysql-test/r/bdb.log mysql-test/r/bdb.log
mysql-test/r/im_client_port.log mysql-test/r/im_client_port.log
mysql-test/r/udf.log mysql-test/r/udf.log
extra/yassl/taocrypt/benchmark/benchmark
extra/yassl/taocrypt/test/test
extra/yassl/testsuite/testsuite
...@@ -1223,6 +1223,7 @@ sub signal_setup () { ...@@ -1223,6 +1223,7 @@ sub signal_setup () {
$SIG{INT}= \&handle_int_signal; $SIG{INT}= \&handle_int_signal;
} }
sub handle_int_signal () { sub handle_int_signal () {
$SIG{INT}= 'DEFAULT'; # If we get a ^C again, we die... $SIG{INT}= 'DEFAULT'; # If we get a ^C again, we die...
mtr_warning("got INT signal, cleaning up....."); mtr_warning("got INT signal, cleaning up.....");
...@@ -1438,7 +1439,6 @@ sub check_ndbcluster_support () { ...@@ -1438,7 +1439,6 @@ sub check_ndbcluster_support () {
return; return;
} }
# FIXME why is there a different start below?!
sub ndbcluster_install () { sub ndbcluster_install () {
...@@ -1465,6 +1465,7 @@ sub ndbcluster_install () { ...@@ -1465,6 +1465,7 @@ sub ndbcluster_install () {
return 0; return 0;
} }
sub ndbcluster_start ($) { sub ndbcluster_start ($) {
my $use_ndbcluster= shift; my $use_ndbcluster= shift;
...@@ -1497,6 +1498,7 @@ sub ndbcluster_start ($) { ...@@ -1497,6 +1498,7 @@ sub ndbcluster_start ($) {
return 0; return 0;
} }
sub ndbcluster_stop () { sub ndbcluster_stop () {
if ( ! $using_ndbcluster_master or $glob_use_running_ndbcluster ) if ( ! $using_ndbcluster_master or $glob_use_running_ndbcluster )
{ {
...@@ -1594,6 +1596,7 @@ sub run_tests () { ...@@ -1594,6 +1596,7 @@ sub run_tests () {
run_suite($opt_suite); run_suite($opt_suite);
} }
sub run_suite () { sub run_suite () {
my $suite= shift; my $suite= shift;
...@@ -1947,9 +1950,9 @@ sub run_testcase ($) { ...@@ -1947,9 +1950,9 @@ sub run_testcase ($) {
mtr_tofile($master->[0]->{'path_myerr'},"CURRENT_TEST: $tname\n"); mtr_tofile($master->[0]->{'path_myerr'},"CURRENT_TEST: $tname\n");
# FIXME test cases that depend on each other, prevent this from # FIXME test cases that depend on each other, prevent this from
# being at this location. # being at this location.
# do_before_start_master($tname,$tinfo->{'master_sh'}); # do_before_start_master($tname,$tinfo->{'master_sh'});
# ---------------------------------------------------------------------- # ----------------------------------------------------------------------
# If any mysqld servers running died, we have to know # If any mysqld servers running died, we have to know
...@@ -2125,6 +2128,7 @@ sub run_testcase ($) { ...@@ -2125,6 +2128,7 @@ sub run_testcase ($) {
} }
} }
# #
# Save a snapshot of the installed test db(s) # Save a snapshot of the installed test db(s)
# I.e take a snapshot of the var/ dir # I.e take a snapshot of the var/ dir
...@@ -2161,6 +2165,7 @@ sub save_files_before_restore($$) { ...@@ -2161,6 +2165,7 @@ sub save_files_before_restore($$) {
} }
} }
# #
# Restore snapshot of the installed test db(s) # Restore snapshot of the installed test db(s)
# if the snapshot exists # if the snapshot exists
...@@ -2230,9 +2235,9 @@ sub report_failure_and_restart ($) { ...@@ -2230,9 +2235,9 @@ sub report_failure_and_restart ($) {
# #
############################################################################## ##############################################################################
# The embedded server needs the cleanup so we do some of the start work # The embedded server needs the cleanup so we do some of the start work
# but stop before actually running mysqld or anything. # but stop before actually running mysqld or anything.
sub do_before_start_master ($$) { sub do_before_start_master ($$) {
my $tname= shift; my $tname= shift;
my $init_script= shift; my $init_script= shift;
...@@ -2265,13 +2270,14 @@ sub do_before_start_master ($$) { ...@@ -2265,13 +2270,14 @@ sub do_before_start_master ($$) {
if ( $ret != 0 ) if ( $ret != 0 )
{ {
# FIXME rewrite those scripts to return 0 if successful # FIXME rewrite those scripts to return 0 if successful
# mtr_warning("$init_script exited with code $ret"); # mtr_warning("$init_script exited with code $ret");
} }
} }
# for gcov FIXME needed? If so we need more absolute paths # for gcov FIXME needed? If so we need more absolute paths
# chdir($glob_basedir); # chdir($glob_basedir);
} }
sub do_before_start_slave ($$) { sub do_before_start_slave ($$) {
my $tname= shift; my $tname= shift;
my $init_script= shift; my $init_script= shift;
...@@ -2299,7 +2305,7 @@ sub do_before_start_slave ($$) { ...@@ -2299,7 +2305,7 @@ sub do_before_start_slave ($$) {
if ( $ret != 0 ) if ( $ret != 0 )
{ {
# FIXME rewrite those scripts to return 0 if successful # FIXME rewrite those scripts to return 0 if successful
# mtr_warning("$init_script exited with code $ret"); # mtr_warning("$init_script exited with code $ret");
} }
} }
...@@ -2309,6 +2315,7 @@ sub do_before_start_slave ($$) { ...@@ -2309,6 +2315,7 @@ sub do_before_start_slave ($$) {
} }
} }
sub mysqld_arguments ($$$$$$) { sub mysqld_arguments ($$$$$$) {
my $args= shift; my $args= shift;
my $type= shift; # master/slave/bootstrap my $type= shift; # master/slave/bootstrap
...@@ -2532,14 +2539,6 @@ sub mysqld_arguments ($$$$$$) { ...@@ -2532,14 +2539,6 @@ sub mysqld_arguments ($$$$$$) {
return $args; return $args;
} }
# FIXME
# if ( $type eq 'master' and $glob_use_embedded_server )
# {
# # Add a -A to each argument to pass it to embedded server
# my @mysqltest_opt= map {("-A",$_)} @args;
# $opt_extra_mysqltest_opt= \@mysqltest_opt;
# return;
# }
############################################################################## ##############################################################################
# #
...@@ -2639,6 +2638,7 @@ sub mysqld_start ($$$$$) { ...@@ -2639,6 +2638,7 @@ sub mysqld_start ($$$$$) {
return 0; return 0;
} }
sub stop_masters_slaves () { sub stop_masters_slaves () {
print "Ending Tests\n"; print "Ending Tests\n";
...@@ -2656,6 +2656,7 @@ sub stop_masters_slaves () { ...@@ -2656,6 +2656,7 @@ sub stop_masters_slaves () {
print "Slave(s) shutdown finished\n"; print "Slave(s) shutdown finished\n";
} }
sub stop_masters () { sub stop_masters () {
my @args; my @args;
...@@ -2685,6 +2686,7 @@ sub stop_masters () { ...@@ -2685,6 +2686,7 @@ sub stop_masters () {
mtr_stop_mysqld_servers(\@args); mtr_stop_mysqld_servers(\@args);
} }
sub stop_slaves () { sub stop_slaves () {
my $force= shift; my $force= shift;
...@@ -2761,6 +2763,7 @@ sub im_start($$) { ...@@ -2761,6 +2763,7 @@ sub im_start($$) {
mtr_get_pid_from_file($instance_manager->{'path_pid'}); mtr_get_pid_from_file($instance_manager->{'path_pid'});
} }
sub im_stop($) { sub im_stop($) {
my $instance_manager = shift; my $instance_manager = shift;
...@@ -2801,6 +2804,7 @@ sub im_stop($) { ...@@ -2801,6 +2804,7 @@ sub im_stop($) {
$instance_manager->{'pid'} = undef; $instance_manager->{'pid'} = undef;
} }
# #
# Run include/check-testcase.test # Run include/check-testcase.test
# Before a testcase, run in record mode, save result file to var # Before a testcase, run in record mode, save result file to var
...@@ -2849,6 +2853,7 @@ sub run_check_testcase ($) { ...@@ -2849,6 +2853,7 @@ sub run_check_testcase ($) {
} }
} }
sub run_mysqltest ($) { sub run_mysqltest ($) {
my $tinfo= shift; my $tinfo= shift;
...@@ -3185,6 +3190,7 @@ sub gdb_arguments { ...@@ -3185,6 +3190,7 @@ sub gdb_arguments {
$$exe= "xterm"; $$exe= "xterm";
} }
# #
# Modify the exe and args so that program is run in ddd # Modify the exe and args so that program is run in ddd
# #
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment