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
447916b9
Commit
447916b9
authored
May 09, 2008
by
msvensson@pilot.(none)
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Make printout of $name nicer
Remove debug printouts
parent
39e11a1d
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
21 additions
and
19 deletions
+21
-19
mysql-test/lib/mtr_report.pm
mysql-test/lib/mtr_report.pm
+11
-8
mysql-test/mysql-test-run.pl
mysql-test/mysql-test-run.pl
+10
-11
No files found.
mysql-test/lib/mtr_report.pm
View file @
447916b9
...
...
@@ -52,6 +52,9 @@ sub report_option {
#print $name, " setting $opt to ", (defined $value? $value : "undef") ,"\n";
}
sub
_name
{
return
$name
?
$name
.
"
"
:
undef
;
}
sub
_mtr_report_test_name
($)
{
my
$tinfo
=
shift
;
...
...
@@ -63,7 +66,7 @@ sub _mtr_report_test_name ($) {
$tname
.=
"
'
$tinfo
->{combination}'
"
if
defined
$tinfo
->
{
combination
};
print
$name
,
_timestamp
();
print
_name
()
,
_timestamp
();
printf
"
%-40s
",
$tname
;
}
...
...
@@ -388,7 +391,7 @@ sub _timestamp {
# Always print message to screen
sub
mtr_print
(@)
{
print
$name
,
join
("
",
@_
),
"
\n
";
print
_name
()
,
join
("
",
@_
),
"
\n
";
}
...
...
@@ -396,21 +399,21 @@ sub mtr_print (@) {
sub
mtr_report
(@)
{
if
(
defined
$verbose
)
{
print
$name
,
join
("
",
@_
),
"
\n
";
print
_name
()
,
join
("
",
@_
),
"
\n
";
}
}
# Print warning to screen
sub
mtr_warning
(@)
{
print
STDERR
$name
,
_timestamp
(),
print
STDERR
_name
()
,
_timestamp
(),
"
mysql-test-run: WARNING:
",
join
("
",
@_
),
"
\n
";
}
# Print error to screen and then exit
sub
mtr_error
(@)
{
print
STDERR
$name
,
_timestamp
(),
print
STDERR
_name
()
,
_timestamp
(),
"
mysql-test-run: *** ERROR:
",
join
("
",
@_
),
"
\n
";
exit
(
1
);
}
...
...
@@ -419,7 +422,7 @@ sub mtr_error (@) {
sub
mtr_debug
(@)
{
if
(
$verbose
>
2
)
{
print
STDERR
$name
,
print
STDERR
_name
()
,
_timestamp
(),
"
####:
",
join
("
",
@_
),
"
\n
";
}
}
...
...
@@ -428,7 +431,7 @@ sub mtr_debug (@) {
sub
mtr_verbose
(@)
{
if
(
$verbose
)
{
print
STDERR
$name
,
_timestamp
(),
print
STDERR
_name
()
,
_timestamp
(),
"
>
",
join
("
",
@_
),"
\n
";
}
}
...
...
@@ -439,7 +442,7 @@ sub mtr_verbose_restart (@) {
my
$proc
=
$server
->
{
proc
};
if
(
$verbose_restart
)
{
print
STDERR
$name
,
_timestamp
(),
print
STDERR
_name
()
,
_timestamp
(),
"
> Restart
$proc
-
",
join
("
",
@args
),"
\n
";
}
}
...
...
mysql-test/mysql-test-run.pl
View file @
447916b9
...
...
@@ -220,7 +220,6 @@ sub main {
if
(
not
defined
$opt_parallel
)
{
# Try to find a suitable value for number of workers
my
$sys_info
=
My::
SysInfo
->
new
();
$sys_info
->
print_info
();
$opt_parallel
=
$sys_info
->
num_cpus
();
for
my
$limit
(
2000
,
1500
,
1000
,
500
){
...
...
@@ -2828,15 +2827,15 @@ sub run_testcase ($) {
# ----------------------------------------------------------------------
if
(
$opt_start
or
$opt_start_dirty
)
{
mtr_
repor
t
("
\n
Started
",
started
(
all_servers
()));
mtr_
repor
t
("
Waiting for server(s) to exit...
");
mtr_
prin
t
("
\n
Started
",
started
(
all_servers
()));
mtr_
prin
t
("
Waiting for server(s) to exit...
");
my
$proc
=
My::
SafeProcess
->
wait_any
();
if
(
grep
(
$proc
eq
$_
,
started
(
all_servers
()))
)
{
mtr_
repor
t
("
Server
$proc
died
");
mtr_
prin
t
("
Server
$proc
died
");
exit
(
1
);
}
mtr_
repor
t
("
Unknown process
$proc
died
");
mtr_
prin
t
("
Unknown process
$proc
died
");
exit
(
1
);
}
...
...
@@ -3163,7 +3162,7 @@ sub check_expected_crash_and_restart {
# Remove all files and subdirectories of a directory
sub
clean_dir
{
my
(
$dir
)
=
@_
;
mtr_
print
("
clean_dir:
$dir
");
mtr_
verbose
("
clean_dir:
$dir
");
finddepth
(
{
no_chdir
=>
1
,
wanted
=>
sub
{
...
...
@@ -3173,12 +3172,12 @@ sub clean_dir {
# The dir to clean
return
;
}
else
{
mtr_
print
("
rmdir: '
$_
'
");
mtr_
verbose
("
rmdir: '
$_
'
");
rmdir
(
$_
)
or
mtr_warning
("
rmdir(
$_
) failed: $!
");
}
}
else
{
# Hopefully a file
mtr_
print
("
unlink: '
$_
'
");
mtr_
verbose
("
unlink: '
$_
'
");
unlink
(
$_
)
or
mtr_warning
("
unlink(
$_
) failed: $!
");
}
}
...
...
@@ -3198,7 +3197,7 @@ sub clean_datadir {
foreach
my
$cluster
(
clusters
()
)
{
my
$cluster_dir
=
"
$opt_vardir
/
"
.
$cluster
->
{
name
};
mtr_
print
("
- removing '
$cluster_dir
'
");
mtr_
verbose
("
- removing '
$cluster_dir
'
");
rmtree
(
$cluster_dir
);
}
...
...
@@ -3207,7 +3206,7 @@ sub clean_datadir {
{
my
$mysqld_dir
=
dirname
(
$mysqld
->
value
('
datadir
'));
if
(
-
d
$mysqld_dir
)
{
mtr_
print
("
- removing '
$mysqld_dir
'
");
mtr_
verbose
("
- removing '
$mysqld_dir
'
");
rmtree
(
$mysqld_dir
);
}
}
...
...
@@ -3512,7 +3511,7 @@ sub mysqld_start ($$) {
sub
stop_all_servers
()
{
mtr_
print
("
Stopping all servers...
");
mtr_
verbose
("
Stopping all servers...
");
# Kill all started servers
My::SafeProcess::
shutdown
(
0
,
# shutdown timeout 0 => kill
...
...
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