Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
MariaDB
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
MariaDB
Commits
3bd6bd21
Commit
3bd6bd21
authored
Apr 24, 2006
by
unknown
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Move copy_dir to mtr_misc and rename it to mtr_copy_dir
parent
f3949031
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
19 additions
and
30 deletions
+19
-30
mysql-test/lib/mtr_misc.pl
mysql-test/lib/mtr_misc.pl
+17
-8
mysql-test/mysql-test-run.pl
mysql-test/mysql-test-run.pl
+2
-22
No files found.
mysql-test/lib/mtr_misc.pl
View file @
3bd6bd21
...
...
@@ -111,18 +111,27 @@ sub mtr_exe_exists (@) {
}
}
sub
mtr_copy_dir
($$)
{
my
$srcdir
=
shift
;
my
$dstdir
=
shift
;
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
);
# Create destination directory
mkpath
(
$dstdir
);
find
(
\&
mtr_copy_one_file
,
$dstdir
);
}
sub
mtr_copy_one_file
{
print
$
File::Find::
name
,
"
\n
";
}
sub
mtr_same_opts
($$)
{
my
$l1
=
shift
;
...
...
mysql-test/mysql-test-run.pl
View file @
3bd6bd21
...
...
@@ -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
...
...
@@ -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
");
}
}
...
...
@@ -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
)
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment