diff options
author | Sergei Golubchik <sergii@pisem.net> | 2014-12-19 11:35:44 +0100 |
---|---|---|
committer | Sergei Golubchik <sergii@pisem.net> | 2014-12-19 11:35:44 +0100 |
commit | a978bdda1e2de35c79e432f026869e163657a263 (patch) | |
tree | 73e36b02fe3b8515c1f05bf4d43ecfa0bbf7c420 /mysql-test/mysql-test-run.pl | |
parent | 724dbaabc0d06c4446417eb217d8536f193461f9 (diff) | |
parent | 0773c7f422c426e5693fc901df9999092e56aef3 (diff) | |
download | mariadb-git-a978bdda1e2de35c79e432f026869e163657a263.tar.gz |
mysql-5.5.41 merge
Diffstat (limited to 'mysql-test/mysql-test-run.pl')
-rwxr-xr-x | mysql-test/mysql-test-run.pl | 54 |
1 files changed, 48 insertions, 6 deletions
diff --git a/mysql-test/mysql-test-run.pl b/mysql-test/mysql-test-run.pl index 60e0399efd4..60f3475bd17 100755 --- a/mysql-test/mysql-test-run.pl +++ b/mysql-test/mysql-test-run.pl @@ -255,6 +255,7 @@ our $opt_ddd; our $opt_client_ddd; my $opt_boot_ddd; our $opt_manual_gdb; +our $opt_manual_lldb; our $opt_manual_dbx; our $opt_manual_ddd; our $opt_manual_debug; @@ -1156,6 +1157,7 @@ sub command_line_setup { 'gdb' => \$opt_gdb, 'client-gdb' => \$opt_client_gdb, 'manual-gdb' => \$opt_manual_gdb, + 'manual-lldb' => \$opt_manual_lldb, 'boot-gdb' => \$opt_boot_gdb, 'manual-debug' => \$opt_manual_debug, 'ddd' => \$opt_ddd, @@ -1596,8 +1598,9 @@ sub command_line_setup { $opt_debugger= undef; } - if ( $opt_gdb || $opt_ddd || $opt_manual_gdb || $opt_manual_ddd || - $opt_manual_debug || $opt_debugger || $opt_dbx || $opt_manual_dbx) + if ( $opt_gdb || $opt_ddd || $opt_manual_gdb || $opt_manual_lldb || + $opt_manual_ddd || $opt_manual_debug || $opt_debugger || $opt_dbx || + $opt_manual_dbx) { mtr_error("You need to use the client debug options for the", "embedded server. Ex: --client-gdb"); @@ -1624,9 +1627,9 @@ sub command_line_setup { # -------------------------------------------------------------------------- # Check debug related options # -------------------------------------------------------------------------- - if ( $opt_gdb || $opt_client_gdb || $opt_ddd || $opt_client_ddd || - $opt_manual_gdb || $opt_manual_ddd || $opt_manual_debug || - $opt_dbx || $opt_client_dbx || $opt_manual_dbx || + if ( $opt_gdb || $opt_client_gdb || $opt_ddd || $opt_client_ddd || + $opt_manual_gdb || $opt_manual_lldb || $opt_manual_ddd || + $opt_manual_debug || $opt_dbx || $opt_client_dbx || $opt_manual_dbx || $opt_debugger || $opt_client_debugger ) { if ( using_extern() ) @@ -2487,6 +2490,14 @@ sub environment_setup { "$bindir/sql$opt_vs_config/mysql_tzinfo_to_sql"); $ENV{'MYSQL_TZINFO_TO_SQL'}= native_path($exe_mysql_tzinfo_to_sql); + # ---------------------------------------------------- + # replace + # ---------------------------------------------------- + my $exe_replace= mtr_exe_exists(vs_config_dirs('extra', 'replace'), + "$basedir/extra/replace", + "$path_client_bindir/replace"); + $ENV{'REPLACE'}= native_path($exe_replace); + # Create an environment variable to make it possible # to detect that valgrind is being used from test cases $ENV{'VALGRIND_TEST'}= $opt_valgrind; @@ -5429,6 +5440,10 @@ sub mysqld_start ($$) { { gdb_arguments(\$args, \$exe, $mysqld->name()); } + elsif ( $opt_manual_lldb ) + { + lldb_arguments(\$args, \$exe, $mysqld->name()); + } elsif ( $opt_ddd || $opt_manual_ddd ) { ddd_arguments(\$args, \$exe, $mysqld->name()); @@ -5975,7 +5990,6 @@ sub start_mysqltest ($) { return $proc; } - # # Modify the exe and args so that program is run in gdb in xterm # @@ -6026,6 +6040,32 @@ sub gdb_arguments { $$exe= "xterm"; } +# +# Modify the exe and args so that program is run in lldb +# +sub lldb_arguments { + my $args= shift; + my $exe= shift; + my $type= shift; + my $input= shift; + + my $lldb_init_file= "$opt_vardir/tmp/lldbinit.$type"; + unlink($lldb_init_file); + + # Put $args into a single string + my $str= join(" ", @$$args); + $input = $input ? "< $input" : ""; + + # write init file for mysqld or client + mtr_tofile($lldb_init_file, "set args $str $input\n"); + + print "\nTo start lldb for $type, type in another window:\n"; + print "cd $glob_mysql_test_dir && lldb -s $lldb_init_file $$exe\n"; + + # Indicate the exe should not be started + $$exe= undef; + return; +} # # Modify the exe and args so that program is run in ddd @@ -6435,6 +6475,8 @@ Options for debugging the product test(s) manual-dbx Let user manually start mysqld in dbx, before running test(s) + manual-lldb Let user manually start mysqld in lldb, before running + test(s) max-save-core Limit the number of core files saved (to avoid filling up disks for heavily crashing server). Defaults to $opt_max_save_core, set to 0 for no limit. Set |