From: Bjorn Munch Date: January 28 2011 3:41pm Subject: bzr push into mysql-trunk-mtr branch (bjorn.munch:3018 to 3019) List-Archive: http://lists.mysql.com/commits/129893 Message-Id: <201101281541.p0SFfb3j017833@khepri15.norway.sun.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit 3019 Bjorn Munch 2011-01-28 [merge] upmerge 59148 modified: mysql-test/mysql-test-run.pl 3018 Bjorn Munch 2011-01-27 [merge] upmerge 59489 modified: mysql-test/lib/My/SafeProcess.pm mysql-test/lib/My/SafeProcess/safe_process.cc mysql-test/lib/My/SafeProcess/safe_process_win.cc mysql-test/mysql-test-run.pl === modified file 'mysql-test/mysql-test-run.pl' --- a/mysql-test/mysql-test-run.pl 2011-01-27 18:32:46 +0000 +++ b/mysql-test/mysql-test-run.pl 2011-01-28 15:40:27 +0000 @@ -418,6 +418,14 @@ sub main { my $server_port = $server->sockport(); mtr_report("Using server port $server_port"); + # -------------------------------------------------------------------------- + # Read definitions from include/plugin.defs + # + read_plugin_defs("include/plugin.defs"); + + # Simplify reference to semisync plugins + $ENV{'SEMISYNC_PLUGIN_OPT'}= $ENV{'SEMISYNC_MASTER_PLUGIN_OPT'}; + # Create child processes my %children; for my $child_num (1..$opt_parallel){ @@ -1975,7 +1983,7 @@ sub find_plugin($$) { my ($plugin, $location) = @_; my $plugin_filename; - + if (IS_WINDOWS) { $plugin_filename = $plugin.".dll"; @@ -1985,13 +1993,13 @@ sub find_plugin($$) $plugin_filename = $plugin.".so"; } - my $lib_example_plugin= + my $lib_plugin= mtr_file_exists(vs_config_dirs($location,$plugin_filename), "$basedir/lib/plugin/".$plugin_filename, "$basedir/$location/.libs/".$plugin_filename, "$basedir/lib/mysql/plugin/".$plugin_filename, ); - return $lib_example_plugin; + return $lib_plugin; } # @@ -2001,10 +2009,16 @@ sub find_plugin($$) sub read_plugin_defs($) { my ($defs_file)= @_; + my $running_debug= 0; open(PLUGDEF, '<', $defs_file) or mtr_error("Can't read plugin defintions file $defs_file"); + # Need to check if we will be running mysqld-debug + if ($opt_debug) { + $running_debug= 1 if find_mysqld($basedir) =~ /-debug$/; + } + while () { next if /^#/; my ($plug_file, $plug_loc, $plug_var, $plug_names)= split; @@ -2012,6 +2026,9 @@ sub read_plugin_defs($) next unless $plug_file; mtr_error("Lines in $defs_file must have 3 or 4 items") unless $plug_var; + # If running debug server, plugins will be in 'debug' subdirectory + $plug_file= "debug/$plug_file" if $running_debug; + my ($plugin)= find_plugin($plug_file, $plug_loc); # Set env. variables that tests may use, set to empty if plugin @@ -2076,19 +2093,10 @@ sub environment_setup { push(@ld_library_paths, "$basedir/storage/ndb/src/.libs"); } - # -------------------------------------------------------------------------- - # Read definitions from include/plugin.defs - # # Plugin settings should no longer be added here, instead # place definitions in include/plugin.defs. # See comment in that file for details. # -------------------------------------------------------------------------- - read_plugin_defs("include/plugin.defs"); - - # Simplify reference to semisync plugins - $ENV{'SEMISYNC_PLUGIN_OPT'}= $ENV{'SEMISYNC_MASTER_PLUGIN_OPT'}; - - # -------------------------------------------------------------------------- # 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 No bundle (reason: useless for push emails).