diff options
author | unknown <msvensson@shellback.(none)> | 2006-03-23 18:58:53 +0100 |
---|---|---|
committer | unknown <msvensson@shellback.(none)> | 2006-03-23 18:58:53 +0100 |
commit | 52c4dbd88bd9db49c5a2d729af755073d354a790 (patch) | |
tree | 79618e6346e08d2838fdc298c7acdbc74d6c585b /mysql-test/mysql-test-run.pl | |
parent | 4688ccf09900b5dc9ae137eb65c7f4f949004d24 (diff) | |
parent | 145e4258e56c9bb02f19ff69054daa3fe3d6772c (diff) | |
download | mariadb-git-52c4dbd88bd9db49c5a2d729af755073d354a790.tar.gz |
Merge bk-internal.mysql.com:/home/bk/mysql-5.0
into shellback.(none):/home/msvensson/mysql/mysql-5.0
client/mysqltest.c:
Auto merged
mysql-test/mysql-test-run.pl:
Auto merged
Diffstat (limited to 'mysql-test/mysql-test-run.pl')
-rwxr-xr-x | mysql-test/mysql-test-run.pl | 34 |
1 files changed, 32 insertions, 2 deletions
diff --git a/mysql-test/mysql-test-run.pl b/mysql-test/mysql-test-run.pl index a9bbe3bc7e1..94ca0ae6924 100755 --- a/mysql-test/mysql-test-run.pl +++ b/mysql-test/mysql-test-run.pl @@ -1129,6 +1129,14 @@ sub environment_setup () { } # -------------------------------------------------------------------------- + # Add the path where mysqld will find udf_example.so + # -------------------------------------------------------------------------- + $ENV{'LD_LIBRARY_PATH'}= + "$glob_basedir/sql/.libs" . + ($ENV{'LD_LIBRARY_PATH'} ? ":$ENV{'LD_LIBRARY_PATH'}" : ""); + + + # -------------------------------------------------------------------------- # Also command lines in .opt files may contain env vars # -------------------------------------------------------------------------- @@ -2099,11 +2107,32 @@ sub save_installed_db () { } } + +# +# Save any interesting files in the data_dir +# before the data dir is removed. +# +sub save_files_before_restore($$) { + my $test_name= shift; + my $data_dir= shift; + my $save_name= "$opt_vardir/log/$test_name"; + + # Look for core files + foreach my $core_file ( glob("$data_dir/core*") ) + { + my $core_name= basename($core_file); + mtr_report("Saving $core_name"); + mkdir($save_name) if ! -d $save_name; + rename("$core_file", "$save_name/$core_name"); + } +} + # # Restore snapshot of the installed test db(s) # if the snapshot exists # -sub restore_installed_db () { +sub restore_installed_db ($) { + my $test_name= shift; if ( -d $path_snapshot) { @@ -2114,6 +2143,7 @@ sub restore_installed_db () { foreach my $data_dir (@data_dir_lst) { my $name= basename($data_dir); + save_files_before_restore($test_name, $data_dir); rmtree("$data_dir"); copy_dir("$path_snapshot/$name", "$data_dir"); } @@ -2141,7 +2171,7 @@ sub report_failure_and_restart ($) { if ( $opt_force ) { # Restore the snapshot of the installed test db - restore_installed_db(); + restore_installed_db($tinfo->{'name'}); print "Resuming Tests\n\n"; return; } |