Loading mysql-test/lib/mtr_misc.pl +17 −8 Original line number Diff line number Diff line Loading @@ -111,19 +111,28 @@ sub mtr_exe_exists (@) { } } sub mtr_copy_dir($$) { my $srcdir= shift; my $dstdir= shift; # Create destination directory mkpath($dstdir); find(\&mtr_copy_one_file, $dstdir); sub mtr_copy_dir($$) { my $from_dir= shift; my $to_dir= shift; mkpath("$to_dir"); opendir(DIR, "$from_dir") or mtr_error("Can't find $from_dir$!"); for(readdir(DIR)) { next if "$_" eq "." or "$_" eq ".."; if ( -d "$from_dir/$_" ) { mtr_copy_dir("$from_dir/$_", "$to_dir/$_"); next; } copy("$from_dir/$_", "$to_dir/$_"); } closedir(DIR); sub mtr_copy_one_file { print $File::Find::name, "\n"; } sub mtr_same_opts ($$) { my $l1= shift; my $l2= shift; Loading mysql-test/mysql-test-run.pl +2 −22 Original line number Diff line number Diff line Loading @@ -2125,26 +2125,6 @@ sub run_testcase ($) { } } sub copy_dir($$) { my $from_dir= shift; my $to_dir= shift; mkpath("$to_dir"); opendir(DIR, "$from_dir") or mtr_error("Can't find $from_dir$!"); for(readdir(DIR)) { next if "$_" eq "." or "$_" eq ".."; if ( -d "$from_dir/$_" ) { copy_dir("$from_dir/$_", "$to_dir/$_"); next; } copy("$from_dir/$_", "$to_dir/$_"); } closedir(DIR); } # # Save a snapshot of the installed test db(s) # I.e take a snapshot of the var/ dir Loading @@ -2157,7 +2137,7 @@ sub save_installed_db () { foreach my $data_dir (@data_dir_lst) { my $name= basename($data_dir); copy_dir("$data_dir", "$path_snapshot/$name"); mtr_copy_dir("$data_dir", "$path_snapshot/$name"); } } Loading Loading @@ -2199,7 +2179,7 @@ sub restore_installed_db ($) { my $name= basename($data_dir); save_files_before_restore($test_name, $data_dir); rmtree("$data_dir"); copy_dir("$path_snapshot/$name", "$data_dir"); mtr_copy_dir("$path_snapshot/$name", "$data_dir"); } if ($opt_with_ndbcluster) { Loading Loading
mysql-test/lib/mtr_misc.pl +17 −8 Original line number Diff line number Diff line Loading @@ -111,19 +111,28 @@ sub mtr_exe_exists (@) { } } sub mtr_copy_dir($$) { my $srcdir= shift; my $dstdir= shift; # Create destination directory mkpath($dstdir); find(\&mtr_copy_one_file, $dstdir); sub mtr_copy_dir($$) { my $from_dir= shift; my $to_dir= shift; mkpath("$to_dir"); opendir(DIR, "$from_dir") or mtr_error("Can't find $from_dir$!"); for(readdir(DIR)) { next if "$_" eq "." or "$_" eq ".."; if ( -d "$from_dir/$_" ) { mtr_copy_dir("$from_dir/$_", "$to_dir/$_"); next; } copy("$from_dir/$_", "$to_dir/$_"); } closedir(DIR); sub mtr_copy_one_file { print $File::Find::name, "\n"; } sub mtr_same_opts ($$) { my $l1= shift; my $l2= shift; Loading
mysql-test/mysql-test-run.pl +2 −22 Original line number Diff line number Diff line Loading @@ -2125,26 +2125,6 @@ sub run_testcase ($) { } } sub copy_dir($$) { my $from_dir= shift; my $to_dir= shift; mkpath("$to_dir"); opendir(DIR, "$from_dir") or mtr_error("Can't find $from_dir$!"); for(readdir(DIR)) { next if "$_" eq "." or "$_" eq ".."; if ( -d "$from_dir/$_" ) { copy_dir("$from_dir/$_", "$to_dir/$_"); next; } copy("$from_dir/$_", "$to_dir/$_"); } closedir(DIR); } # # Save a snapshot of the installed test db(s) # I.e take a snapshot of the var/ dir Loading @@ -2157,7 +2137,7 @@ sub save_installed_db () { foreach my $data_dir (@data_dir_lst) { my $name= basename($data_dir); copy_dir("$data_dir", "$path_snapshot/$name"); mtr_copy_dir("$data_dir", "$path_snapshot/$name"); } } Loading Loading @@ -2199,7 +2179,7 @@ sub restore_installed_db ($) { my $name= basename($data_dir); save_files_before_restore($test_name, $data_dir); rmtree("$data_dir"); copy_dir("$path_snapshot/$name", "$data_dir"); mtr_copy_dir("$path_snapshot/$name", "$data_dir"); } if ($opt_with_ndbcluster) { Loading