diff options
author | unknown <tsmith/tim@siva.hindu.god> | 2006-12-26 16:49:10 -0700 |
---|---|---|
committer | unknown <tsmith/tim@siva.hindu.god> | 2006-12-26 16:49:10 -0700 |
commit | 20a21725290f11a413aeda7e2ddfbe3aa5e36ffa (patch) | |
tree | e6bcbe8baaed6b27ac43fd5aa816ebe6f1e949f8 /mysql-test/mysql-test-run.pl | |
parent | 2f7e36f686f1352cab19481db13afaa82adf8445 (diff) | |
parent | 159078bef079fdb2186fbdf9f5812a322f4515af (diff) | |
download | mariadb-git-20a21725290f11a413aeda7e2ddfbe3aa5e36ffa.tar.gz |
Merge siva.hindu.god:/usr/home/tim/m/bk/g51
into siva.hindu.god:/usr/home/tim/m/bk/tmp/mrg51-dec26
Makefile.am:
Auto merged
client/mysqlbinlog.cc:
Auto merged
configure.in:
Auto merged
client/mysqltest.c:
Auto merged
include/config-win.h:
Auto merged
include/my_global.h:
Auto merged
include/my_pthread.h:
Auto merged
include/mysql.h:
Auto merged
include/typelib.h:
Auto merged
mysql-test/Makefile.am:
Auto merged
mysql-test/r/sp.result:
Auto merged
mysql-test/r/type_timestamp.result:
Auto merged
mysql-test/r/warnings.result:
Auto merged
mysys/default.c:
Auto merged
mysys/my_wincond.c:
Auto merged
mysys/typelib.c:
Auto merged
server-tools/instance-manager/Makefile.am:
Auto merged
server-tools/instance-manager/guardian.cc:
Auto merged
server-tools/instance-manager/instance.cc:
Auto merged
sql/field.cc:
Auto merged
sql/item_sum.cc:
Auto merged
sql/item_sum.h:
Auto merged
sql/net_serv.cc:
Auto merged
sql/opt_range.cc:
Auto merged
sql/sql_class.h:
Auto merged
sql/sql_parse.cc:
Auto merged
sql/share/charsets/hebrew.xml:
Auto merged
sql/sql_show.cc:
Auto merged
storage/federated/ha_federated.cc:
Auto merged
strings/conf_to_src.c:
Auto merged
vio/viossl.c:
Auto merged
sql/field.h:
Manual merge
sql/log_event.cc:
Manual merge
Diffstat (limited to 'mysql-test/mysql-test-run.pl')
-rwxr-xr-x | mysql-test/mysql-test-run.pl | 77 |
1 files changed, 64 insertions, 13 deletions
diff --git a/mysql-test/mysql-test-run.pl b/mysql-test/mysql-test-run.pl index ccee36025ee..5795d852b79 100755 --- a/mysql-test/mysql-test-run.pl +++ b/mysql-test/mysql-test-run.pl @@ -160,6 +160,7 @@ our $exe_im; our $exe_my_print_defaults; our $exe_perror; our $lib_udf_example; +our $lib_example_plugin; our $exe_libtool; our $opt_bench= 0; @@ -231,10 +232,12 @@ our $opt_ndbconnectstring_slave; our $opt_record; my $opt_report_features; our $opt_check_testcases; +our $opt_mark_progress; our $opt_skip; our $opt_skip_rpl; our $max_slave_num= 0; +our $max_master_num= 1; our $use_innodb; our $opt_skip_test; our $opt_skip_im; @@ -413,6 +416,15 @@ sub main () { $max_slave_num= $test->{slave_num}; mtr_error("Too many slaves") if $max_slave_num > 3; } + + # Count max number of masters used by a test case + if ( $test->{master_num} > $max_master_num) + { + $max_master_num= $test->{master_num}; + mtr_error("Too many masters") if $max_master_num > 2; + mtr_error("Too few masters") if $max_master_num < 1; + } + $use_innodb||= $test->{'innodb_test'}; } @@ -536,6 +548,7 @@ sub command_line_setup () { # Test case authoring 'record' => \$opt_record, 'check-testcases' => \$opt_check_testcases, + 'mark-progress' => \$opt_mark_progress, # Extra options used when starting mysqld 'mysqld=s' => \@opt_extra_mysqld_opt, @@ -1211,6 +1224,19 @@ sub command_line_setup () { $path_ndb_testrun_log= "$opt_vardir/log/ndb_testrun.log"; $path_snapshot= "$opt_tmpdir/snapshot_$opt_master_myport/"; + + if ( $opt_valgrind and $opt_debug ) + { + # When both --valgrind and --debug is selected, send + # all output to the trace file, making it possible to + # see the exact location where valgrind complains + foreach my $mysqld (@{$master}, @{$slave}) + { + my $sidx= $mysqld->{idx} ? "$mysqld->{idx}" : ""; + $mysqld->{path_myerr}= + "$opt_vardir/log/" . $mysqld->{type} . "$sidx.trace"; + } + } } # @@ -1259,9 +1285,10 @@ sub set_mtr_build_thread_ports($) { sub datadir_list_setup () { # Make a list of all data_dirs - @data_dir_lst = ( - $master->[0]->{'path_myddir'}, - $master->[1]->{'path_myddir'}); + for (my $idx= 0; $idx < $max_master_num; $idx++) + { + push(@data_dir_lst, $master->[$idx]->{'path_myddir'}); + } for (my $idx= 0; $idx < $max_slave_num; $idx++) { @@ -1499,6 +1526,11 @@ sub executable_setup () { mtr_file_exists(vs_config_dirs('sql', 'udf_example.dll'), "$glob_basedir/sql/.libs/udf_example.so",); + # Look for the ha_example library + $lib_example_plugin= + mtr_file_exists(vs_config_dirs('storage/example', 'ha_example.dll'), + "$glob_basedir/storage/example/.libs/ha_example.so",); + # Look for mysqltest executable if ( $glob_use_embedded_server ) { @@ -1655,6 +1687,14 @@ sub environment_setup () { } # -------------------------------------------------------------------------- + # Add the path where mysqld will find ha_example.so + # -------------------------------------------------------------------------- + if ( $lib_example_plugin ) + { + push(@ld_library_paths, dirname($lib_example_plugin)); + } + + # -------------------------------------------------------------------------- # Valgrind need to be run with debug libraries otherwise it's almost # impossible to add correct supressions, that means if "/usr/lib/debug" # is available, it should be added to @@ -1928,10 +1968,11 @@ sub environment_setup () { $ENV{'UDF_EXAMPLE_LIB'}= ($lib_udf_example ? basename($lib_udf_example) : ""); - $ENV{'LD_LIBRARY_PATH'}= - ($lib_udf_example ? dirname($lib_udf_example) : "") . - ($ENV{'LD_LIBRARY_PATH'} ? ":$ENV{'LD_LIBRARY_PATH'}" : ""); - + # ---------------------------------------------------- + # Add the path where mysqld will find ha_example.so + # ---------------------------------------------------- + $ENV{'EXAMPLE_PLUGIN'}= + ($lib_example_plugin ? basename($lib_example_plugin) : ""); # ---------------------------------------------------- # We are nice and report a bit about our settings @@ -2730,8 +2771,10 @@ sub mysql_install_db () { install_db('master', $master->[0]->{'path_myddir'}); - # FIXME check if testcase really is using second master - copy_install_db('master', $master->[1]->{'path_myddir'}); + if ($max_master_num) + { + copy_install_db('master', $master->[1]->{'path_myddir'}); + } # Install the number of slave databses needed for (my $idx= 0; $idx < $max_slave_num; $idx++) @@ -3533,11 +3576,10 @@ sub mysqld_arguments ($$$$$) { if ( $glob_use_embedded_server ) { $prefix= "--server-arg="; - } else { - # We can't pass embedded server --no-defaults - mtr_add_arg($args, "--no-defaults"); } + mtr_add_arg($args, "%s--no-defaults", $prefix); + mtr_add_arg($args, "%s--console", $prefix); mtr_add_arg($args, "%s--basedir=%s", $prefix, $path_my_basedir); mtr_add_arg($args, "%s--character-sets-dir=%s", $prefix, $path_charsetsdir); @@ -3616,6 +3658,9 @@ sub mysqld_arguments ($$$$$) { # Turn on logging, will be sent to tables mtr_add_arg($args, "%s--log=", $prefix); } + + mtr_add_arg($args, "%s--plugin_dir=%s", $prefix, + dirname($lib_example_plugin)); } if ( $type eq 'slave' ) @@ -4266,7 +4311,8 @@ sub run_testcase_start_servers($) { } - if ( $clusters->[0]->{'pid'} and ! $master->[1]->{'pid'} ) + if ( $clusters->[0]->{'pid'} and ! $master->[1]->{'pid'} and + $tinfo->{'master_num'} > 1 ) { # Test needs cluster, start an extra mysqld connected to cluster @@ -4478,6 +4524,10 @@ sub run_mysqltest ($) { mtr_add_arg($args, "--character-sets-dir=%s", $path_charsetsdir); mtr_add_arg($args, "--logdir=%s/log", $opt_vardir); + # Log line number and time for each line in .test file + mtr_add_arg($args, "--mark-progress") + if $opt_mark_progress; + if ($tinfo->{'component_id'} eq 'im') { mtr_add_arg($args, "--socket=%s", $instance_manager->{'path_sock'}); @@ -4933,6 +4983,7 @@ Options for test case authoring record TESTNAME (Re)genereate the result file for TESTNAME check-testcases Check testcases for sideeffects + mark-progress Log line number and elapsed time to <testname>.progress Options that pass on options |