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
47c9056c
Commit
47c9056c
authored
Sep 05, 2008
by
Magnus Svensson
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix gcov in mtr.pl
parent
78789715
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
20 additions
and
38 deletions
+20
-38
mysql-test/lib/mtr_gcov.pl
mysql-test/lib/mtr_gcov.pl
+14
-22
mysql-test/mysql-test-run.pl
mysql-test/mysql-test-run.pl
+6
-16
No files found.
mysql-test/lib/mtr_gcov.pl
View file @
47c9056c
...
@@ -20,25 +20,14 @@
...
@@ -20,25 +20,14 @@
use
strict
;
use
strict
;
# These are not to be prefixed with "mtr_"
sub
gcov_prepare
($)
{
my
(
$dir
)
=
@_
;
sub
gcov_prepare
();
`
find
$dir
-name
\
*.gcov
\
sub
gcov_collect
();
##############################################################################
#
#
#
##############################################################################
sub
gcov_prepare
()
{
`
find $::glob_basedir -name
\
*.gcov
\
-or -name
\
*.da | xargs rm
`;
-or -name
\
*.da | xargs rm
`;
}
}
# Used by gcov
my
@mysqld_src_dirs
=
our
@mysqld_src_dirs
=
(
(
"
strings
",
"
strings
",
"
mysys
",
"
mysys
",
...
@@ -53,21 +42,24 @@ our @mysqld_src_dirs=
...
@@ -53,21 +42,24 @@ our @mysqld_src_dirs=
"
sql
",
"
sql
",
);
);
sub
gcov_collect
()
{
sub
gcov_collect
($$$)
{
my
(
$dir
,
$gcov
,
$gcov_msg
,
$err
)
=
@_
;
my
$start_dir
=
cwd
();
print
"
Collecting source coverage info...
\n
";
print
"
Collecting source coverage info...
\n
";
-
f
$
::opt_gcov_msg
and
unlink
(
$::opt_
gcov_msg
);
-
f
$
gcov_msg
and
unlink
(
$
gcov_msg
);
-
f
$
::opt_gcov_err
and
unlink
(
$::opt_
gcov_err
);
-
f
$
gcov_err
and
unlink
(
$
gcov_err
);
foreach
my
$d
(
@mysqld_src_dirs
)
foreach
my
$d
(
@mysqld_src_dirs
)
{
{
chdir
("
$
::glob_base
dir/
$d
");
chdir
("
$dir
/
$d
");
foreach
my
$f
(
(
glob
("
*.h
"),
glob
("
*.cc
"),
glob
("
*.c
"))
)
foreach
my
$f
(
(
glob
("
*.h
"),
glob
("
*.cc
"),
glob
("
*.c
"))
)
{
{
`
$
::opt_gcov
$f
2>>$::opt_gcov_err >>$::opt_
gcov_msg
`;
`
$
gcov
$f
2>>
$gcov_err
>>
$
gcov_msg
`;
}
}
chdir
(
$
::glob_mysql_tes
t_dir
);
chdir
(
$
star
t_dir
);
}
}
print
"
gcov info in $
::opt_gcov_msg, errors in $::opt_
gcov_err
\n
";
print
"
gcov info in
$
gcov_msg
, errors in
$
gcov_err
\n
";
}
}
...
...
mysql-test/mysql-test-run.pl
View file @
47c9056c
...
@@ -257,7 +257,7 @@ sub main {
...
@@ -257,7 +257,7 @@ sub main {
command_line_setup
(
0
);
command_line_setup
(
0
);
if
(
$opt_gcov
)
{
if
(
$opt_gcov
)
{
gcov_prepare
();
gcov_prepare
(
$basedir
);
}
}
if
(
!
$opt_suites
)
{
if
(
!
$opt_suites
)
{
...
@@ -346,6 +346,11 @@ sub main {
...
@@ -346,6 +346,11 @@ sub main {
mtr_print_line
();
mtr_print_line
();
if
(
$opt_gcov
)
{
gcov_collect
(
$basedir
,
$opt_gcov
,
$opt_gcov_msg
,
$opt_gcov_err
);
}
mtr_report_stats
(
$completed
);
mtr_report_stats
(
$completed
);
exit
(
0
);
exit
(
0
);
...
@@ -611,11 +616,6 @@ sub run_worker ($) {
...
@@ -611,11 +616,6 @@ sub run_worker ($) {
command_line_setup
(
$thread_num
);
command_line_setup
(
$thread_num
);
if
(
$opt_gcov
)
{
gcov_prepare
();
}
setup_vardir
();
setup_vardir
();
check_running_as_root
();
check_running_as_root
();
mysql_install_db
(
$thread_num
);
mysql_install_db
(
$thread_num
);
...
@@ -649,16 +649,6 @@ sub run_worker ($) {
...
@@ -649,16 +649,6 @@ sub run_worker ($) {
stop_all_servers
();
stop_all_servers
();
if
(
$opt_gcov
)
{
gcov_collect
();
# collect coverage information
}
if
(
$opt_gcov
)
{
gcov_collect
();
# collect coverage information
}
exit
(
1
);
exit
(
1
);
}
}
...
...
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