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
67034b6d
Commit
67034b6d
authored
Dec 06, 2016
by
Monty
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixes for running with gcov
parent
f27ca6f6
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
13 additions
and
9 deletions
+13
-9
.gitignore
.gitignore
+2
-0
BUILD/SETUP.sh
BUILD/SETUP.sh
+1
-1
BUILD/compile-pentium64-gcov
BUILD/compile-pentium64-gcov
+1
-1
debian/mariadb-test.install
debian/mariadb-test.install
+1
-1
mysql-test/README-gcov
mysql-test/README-gcov
+6
-4
mysql-test/lib/mtr_gcov.pl
mysql-test/lib/mtr_gcov.pl
+1
-1
mysql-test/mysql-test-run.pl
mysql-test/mysql-test-run.pl
+1
-1
No files found.
.gitignore
View file @
67034b6d
...
...
@@ -80,6 +80,8 @@ mysql-test/lib/My/SafeProcess/my_safe_process
mysql-test/mtr
mysql-test/mysql-test-run
mysql-test/var
mysql-test-gcov.err
mysql-test-gcov.msg
mysys/thr_lock
mysys/thr_timer
packaging/rpm-oel/mysql.spec
...
...
BUILD/SETUP.sh
View file @
67034b6d
...
...
@@ -293,7 +293,7 @@ gcov_compile_flags="$gcov_compile_flags -DMYSQL_SERVER_SUFFIX=-gcov -DHAVE_gcov"
# GCC4 needs -fprofile-arcs -ftest-coverage on the linker command line (as well
# as on the compiler command line), and this requires setting LDFLAGS for BDB.
gcov_link_flags
=
"-fprofile-arcs -ftest-coverage"
gcov_link_flags
=
"-fprofile-arcs -ftest-coverage
-lgcov
"
gcov_configs
=
"--with-gcov"
...
...
BUILD/compile-pentium64-gcov
View file @
67034b6d
...
...
@@ -28,6 +28,6 @@ export LDFLAGS="$gcov_link_flags"
extra_flags
=
"
$pentium64_cflags
$max_cflags
$gcov_compile_flags
"
c_warnings
=
"
$c_warnings
$debug_extra_warnings
"
cxx_warnings
=
"
$cxx_warnings
$debug_extra_warnings
"
extra_configs
=
"
$pentium_configs
$debug_configs
$gcov_configs
$max_configs
--with-zlib-dir=bundled
"
extra_configs
=
"
$pentium_configs
$debug_configs
$gcov_configs
$max_configs
"
.
"
$path
/FINISH.sh"
debian/mariadb-test.install
View file @
67034b6d
...
...
@@ -17,7 +17,7 @@ usr/lib/mysql/plugin/qa_auth_client.so
usr
/
lib
/
mysql
/
plugin
/
qa_auth_interface
.
so
usr
/
lib
/
mysql
/
plugin
/
qa_auth_server
.
so
usr
/
share
/
mysql
/
mysql
-
test
/
README
usr
/
share
/
mysql
/
mysql
-
test
/
README
.
gcov
usr
/
share
/
mysql
/
mysql
-
test
/
README
-
gcov
usr
/
share
/
mysql
/
mysql
-
test
/
README
.
stress
usr
/
share
/
mysql
/
mysql
-
test
/
disabled
.
def
usr
/
share
/
mysql
/
mysql
-
test
/
lib
...
...
mysql-test/README
.
gcov
→
mysql-test/README
-
gcov
View file @
67034b6d
...
...
@@ -2,12 +2,14 @@ To be able to see the level of coverage with the current test suite,
do the following:
- Make sure gcov is installed
- Compile the MySQL distribution with BUILD/compile-pentium-gcov (if your
- Compile the MySQL distribution with BUILD/compile-pentium
64
-gcov (if your
machine does not have a pentium CPU, hack this script, or just live with
the pentium-specific stuff)
- In the mysql-test directory, run this command: ./mysql-test-run -gcov
- To see the level of coverage for a given source file:
grep
source_file_name /tmp/gcov.out
grep
-1 source_file_name ../mysql-test-gcov.msg
- To see which lines are not yet covered, look at source_file_name.gcov in
the source tree. Then think hard about a test case that will cover those
lines, and write one!
the source tree. You can find this by doing something like:
find source-directory -name "mysqld.cc.gcov"
Then think hard about a test case that will cover those lines, and write
one!
mysql-test/lib/mtr_gcov.pl
View file @
67034b6d
...
...
@@ -27,7 +27,7 @@ sub gcov_prepare ($) {
print
"
Purging gcov information from '
$dir
'...
\n
";
system
("
find
$dir
-name
\
*.gcov -o -name
\
*.da
"
.
"
-o -name
\
*.gcda |
grep -v 'README.gcov
\
$' |
xargs rm
");
.
"
-o -name
\
*.gcda | xargs rm
");
}
#
...
...
mysql-test/mysql-test-run.pl
View file @
67034b6d
...
...
@@ -248,7 +248,7 @@ our $opt_mem= $ENV{'MTR_MEM'};
our
$opt_clean_vardir
=
$ENV
{'
MTR_CLEAN_VARDIR
'};
our
$opt_gcov
;
our
$opt_gcov_src_dir
;
our
$opt_gcov_src_dir
=
"
.
"
;
our
$opt_gcov_exe
=
"
gcov
";
our
$opt_gcov_err
=
"
mysql-test-gcov.err
";
our
$opt_gcov_msg
=
"
mysql-test-gcov.msg
";
...
...
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