summaryrefslogtreecommitdiff
path: root/mysql-test/mysql-test-run.pl
diff options
context:
space:
mode:
authorSergei Golubchik <serg@mariadb.org>2017-01-02 21:28:15 +0100
committerMonty <monty@mariadb.org>2017-01-11 09:18:36 +0200
commit53ae72e2ee657e3bdd348365db3b08844d24c3e3 (patch)
tree46514232155b5c0a34311a0acdffcbdfef718560 /mysql-test/mysql-test-run.pl
parent00f462cf1be56d4cbac420b88c12dc95bc99579d (diff)
downloadmariadb-git-53ae72e2ee657e3bdd348365db3b08844d24c3e3.tar.gz
mtr uses dgcov for --gcov option
Diffstat (limited to 'mysql-test/mysql-test-run.pl')
-rwxr-xr-xmysql-test/mysql-test-run.pl29
1 files changed, 9 insertions, 20 deletions
diff --git a/mysql-test/mysql-test-run.pl b/mysql-test/mysql-test-run.pl
index 9efc9035555..b3fe2d2f20a 100755
--- a/mysql-test/mysql-test-run.pl
+++ b/mysql-test/mysql-test-run.pl
@@ -104,7 +104,6 @@ use IO::Select;
require "mtr_process.pl";
require "mtr_io.pl";
-require "mtr_gcov.pl";
require "mtr_gprof.pl";
require "mtr_misc.pl";
@@ -248,11 +247,6 @@ 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_exe= "gcov";
-our $opt_gcov_err= "mysql-test-gcov.err";
-our $opt_gcov_msg= "mysql-test-gcov.msg";
-
our $opt_gprof;
our %gprof_dirs;
@@ -383,11 +377,6 @@ sub main {
# --help will not reach here, so now it's safe to assume we have binaries
My::SafeProcess::find_bin();
- if ( $opt_gcov ) {
- gcov_prepare($basedir . "/" . $opt_gcov_src_dir);
- }
-
-
print "vardir: $opt_vardir\n";
initialize_servers();
init_timers();
@@ -431,6 +420,10 @@ sub main {
exit 0;
}
+ if ($opt_gcov) {
+ system './dgcov.pl --purge';
+ }
+
#######################################################################
my $num_tests= @$tests;
if ( $opt_parallel eq "auto" ) {
@@ -555,15 +548,15 @@ sub main {
mtr_print_line();
- if ( $opt_gcov ) {
- gcov_collect($basedir . "/" . $opt_gcov_src_dir, $opt_gcov_exe,
- $opt_gcov_msg, $opt_gcov_err);
- }
-
print_total_times($opt_parallel) if $opt_report_times;
mtr_report_stats($prefix, $fail, $completed, $extra_warnings);
+ if ($opt_gcov) {
+ mtr_report("Running dgcov");
+ system "./dgcov.pl --generate > $opt_vardir/last_changes.dgcov";
+ }
+
if ( @$completed != $num_tests)
{
mtr_error("Not all tests completed (only ". scalar(@$completed) .
@@ -1148,7 +1141,6 @@ sub command_line_setup {
# Coverage, profiling etc
'gcov' => \$opt_gcov,
- 'gcov-src-dir=s' => \$opt_gcov_src_dir,
'gprof' => \$opt_gprof,
'valgrind|valgrind-all' => \$opt_valgrind,
'valgrind-mysqltest' => \$opt_valgrind_mysqltest,
@@ -6180,9 +6172,6 @@ Misc options
actions. Disable facility with NUM=0.
gcov Collect coverage information after the test.
The result is a gcov file per source and header file.
- gcov-src-dir=subdir Collect coverage only within the given subdirectory.
- For example, if you're only developing the SQL layer,
- it makes sense to use --gcov-src-dir=sql
gprof Collect profiling information using gprof.
experimental=<file> Refer to list of tests considered experimental;
failures will be marked exp-fail instead of fail.