Commit ec90a4dc authored by unknown's avatar unknown

Merge shellback.(none):/home/msvensson/mysql/mysql-4.1-maint

into  shellback.(none):/home/msvensson/mysql/mysql-5.0-maint


mysql-test/lib/mtr_report.pl:
  Auto merged
mysql-test/mysql-test-run.pl:
  Auto merged
BitKeeper/deleted/.del-check-testcase.test:
  Delete: mysql-test/include/check-testcase.test
parents d078e06c eab94fd0
...@@ -23,12 +23,28 @@ sub gcov_prepare () { ...@@ -23,12 +23,28 @@ sub gcov_prepare () {
-or -name \*.da | xargs rm`; -or -name \*.da | xargs rm`;
} }
# Used by gcov
our @mysqld_src_dirs=
(
"strings",
"mysys",
"include",
"extra",
"regex",
"isam",
"merge",
"myisam",
"myisammrg",
"heap",
"sql",
);
sub gcov_collect () { sub gcov_collect () {
print "Collecting source coverage info...\n"; print "Collecting source coverage info...\n";
-f $::opt_gcov_msg and unlink($::opt_gcov_msg); -f $::opt_gcov_msg and unlink($::opt_gcov_msg);
-f $::opt_gcov_err and unlink($::opt_gcov_err); -f $::opt_gcov_err and unlink($::opt_gcov_err);
foreach my $d ( @::mysqld_src_dirs ) foreach my $d ( @mysqld_src_dirs )
{ {
chdir("$::glob_basedir/$d"); chdir("$::glob_basedir/$d");
foreach my $f ( (glob("*.h"), glob("*.cc"), glob("*.c")) ) foreach my $f ( (glob("*.h"), glob("*.cc"), glob("*.c")) )
......
...@@ -172,7 +172,7 @@ sub mtr_report_stats ($) { ...@@ -172,7 +172,7 @@ sub mtr_report_stats ($) {
my $tot_failed= 0; my $tot_failed= 0;
my $tot_tests= 0; my $tot_tests= 0;
my $tot_restarts= 0; my $tot_restarts= 0;
my $found_problems= 0; # Some warnings are errors... my $found_problems= 0; # Some warnings in the logfiles are errors...
foreach my $tinfo (@$tests) foreach my $tinfo (@$tests)
{ {
...@@ -283,6 +283,7 @@ sub mtr_report_stats ($) { ...@@ -283,6 +283,7 @@ sub mtr_report_stats ($) {
print "\n"; print "\n";
# Print a list of testcases that failed
if ( $tot_failed != 0 ) if ( $tot_failed != 0 )
{ {
my $test_mode= join(" ", @::glob_test_mode) || "default"; my $test_mode= join(" ", @::glob_test_mode) || "default";
...@@ -296,7 +297,30 @@ sub mtr_report_stats ($) { ...@@ -296,7 +297,30 @@ sub mtr_report_stats ($) {
} }
} }
print "\n"; print "\n";
}
# Print a list of check_testcases that failed(if any)
if ( $::opt_check_testcases )
{
my @check_testcases= ();
foreach my $tinfo (@$tests)
{
if ( defined $tinfo->{'check_testcase_failed'} )
{
push(@check_testcases, $tinfo->{'name'});
}
} }
if ( @check_testcases )
{
print "Check of testcase failed for: ";
print join(" ", @check_testcases);
print "\n\n";
}
}
if ( $tot_failed != 0 || $found_problems) if ( $tot_failed != 0 || $found_problems)
{ {
mtr_error("there where failing test cases"); mtr_error("there where failing test cases");
......
...@@ -87,22 +87,6 @@ require "lib/mtr_stress.pl"; ...@@ -87,22 +87,6 @@ require "lib/mtr_stress.pl";
$Devel::Trace::TRACE= 1; $Devel::Trace::TRACE= 1;
# Used by gcov
our @mysqld_src_dirs=
(
"strings",
"mysys",
"include",
"extra",
"regex",
"isam",
"merge",
"myisam",
"myisammrg",
"heap",
"sql",
);
############################################################################## ##############################################################################
# #
# Default settings # Default settings
...@@ -503,9 +487,6 @@ sub initial_setup () { ...@@ -503,9 +487,6 @@ sub initial_setup () {
"$glob_basedir/sql/release/mysqld", "$glob_basedir/sql/release/mysqld",
"$glob_basedir/sql/debug/mysqld"); "$glob_basedir/sql/debug/mysqld");
$exe_master_mysqld= $exe_master_mysqld || $exe_mysqld;
$exe_slave_mysqld= $exe_slave_mysqld || $exe_mysqld;
# Use the mysqld found above to find out what features are available # Use the mysqld found above to find out what features are available
collect_mysqld_features(); collect_mysqld_features();
...@@ -938,6 +919,12 @@ sub command_line_setup () { ...@@ -938,6 +919,12 @@ sub command_line_setup () {
} }
} }
# --------------------------------------------------------------------------
# Check if special exe was selected for master or slave
# --------------------------------------------------------------------------
$exe_master_mysqld= $exe_master_mysqld || $exe_mysqld;
$exe_slave_mysqld= $exe_slave_mysqld || $exe_mysqld;
# -------------------------------------------------------------------------- # --------------------------------------------------------------------------
# Check valgrind arguments # Check valgrind arguments
# -------------------------------------------------------------------------- # --------------------------------------------------------------------------
...@@ -3945,6 +3932,10 @@ sub run_testcase_start_servers($) { ...@@ -3945,6 +3932,10 @@ sub run_testcase_start_servers($) {
# Before a testcase, run in record mode, save result file to var # Before a testcase, run in record mode, save result file to var
# After testcase, run and compare with the recorded file, they should be equal! # After testcase, run and compare with the recorded file, they should be equal!
# #
# RETURN VALUE
# 0 OK
# 1 Check failed
#
sub run_check_testcase ($$) { sub run_check_testcase ($$) {
my $mode= shift; my $mode= shift;
...@@ -3989,6 +3980,7 @@ sub run_check_testcase ($$) { ...@@ -3989,6 +3980,7 @@ sub run_check_testcase ($$) {
{ {
mtr_error("Could not execute 'check-testcase' $mode testcase"); mtr_error("Could not execute 'check-testcase' $mode testcase");
} }
return $res;
} }
...@@ -4178,7 +4170,11 @@ sub run_mysqltest ($) { ...@@ -4178,7 +4170,11 @@ sub run_mysqltest ($) {
{ {
if ($mysqld->{'pid'}) if ($mysqld->{'pid'})
{ {
run_check_testcase("after", $mysqld); if (run_check_testcase("after", $mysqld))
{
# Check failed, mark the test case with that info
$tinfo->{'check_testcase_failed'}= 1;
}
} }
} }
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment