2 # Copyright (c) 2004, 2006 MySQL AB, 2008 Sun Microsystems, Inc.
3 # Use is subject to license terms.
5 # This program is free software; you can redistribute it and/or modify
6 # it under the terms of the GNU General Public License as published by
7 # the Free Software Foundation; version 2 of the License.
9 # This program is distributed in the hope that it will be useful,
10 # but WITHOUT ANY WARRANTY; without even the implied warranty of
11 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 # GNU General Public License for more details.
14 # You should have received a copy of the GNU General Public License
15 # along with this program; if not, write to the Free Software
16 # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
18 # This is a library file used by the Perl version of mysql-test-run,
19 # and is part of the translation of the Bourne shell script with the
24 # These are not to be prefixed with "mtr_"
29 ##############################################################################
33 ##############################################################################
37 `find $::glob_basedir -name \*.gcov \
38 -or -name \*.da | xargs rm`;
59 print "Collecting source coverage info...\n";
60 -f
$::opt_gcov_msg
and unlink($::opt_gcov_msg
);
61 -f
$::opt_gcov_err
and unlink($::opt_gcov_err
);
62 foreach my $d ( @mysqld_src_dirs )
64 chdir("$::glob_basedir/$d");
65 foreach my $f ( (glob("*.h"), glob("*.cc"), glob("*.c")) )
67 `$::opt_gcov $f 2>>$::opt_gcov_err >>$::opt_gcov_msg`;
69 chdir($::glob_mysql_test_dir
);
71 print "gcov info in $::opt_gcov_msg, errors in $::opt_gcov_err\n";