diff options
author | Michael Widenius <monty@mysql.com> | 2009-04-25 12:04:38 +0300 |
---|---|---|
committer | Michael Widenius <monty@mysql.com> | 2009-04-25 12:04:38 +0300 |
commit | 210a412522b10115d34b431c66acf403faab7bfe (patch) | |
tree | 56c09cfd1053265897d114e4acb52d395185f27e /mysql-test/lib/mtr_report.pm | |
parent | 059b9356a19118a48fbad31be81c4859e15d3bc8 (diff) | |
parent | 4aeeb1d157a67c5359475d8941267641fb894b22 (diff) | |
download | mariadb-git-210a412522b10115d34b431c66acf403faab7bfe.tar.gz |
bzr merge from guilhem's maria tree to our local 5.1
configure.in:
Manually merged
mysql-test/lib/My/ConfigFactory.pm:
Manually merged
mysql-test/mysql-test-run.pl:
Manually merged
mysql-test/t/information_schema.test:
Manually merged
sql/handler.cc:
Manually merged
support-files/mysql.spec.sh:
Manually merged
Diffstat (limited to 'mysql-test/lib/mtr_report.pm')
-rw-r--r-- | mysql-test/lib/mtr_report.pm | 40 |
1 files changed, 35 insertions, 5 deletions
diff --git a/mysql-test/lib/mtr_report.pm b/mysql-test/lib/mtr_report.pm index 04a3aeeef7f..cdf77d5e1ce 100644 --- a/mysql-test/lib/mtr_report.pm +++ b/mysql-test/lib/mtr_report.pm @@ -69,6 +69,8 @@ sub _mtr_report_test_name ($) { print _name(), _timestamp(); printf "%-40s ", $tname; + + return $tname; } @@ -105,20 +107,48 @@ sub mtr_report_test_passed ($) { sub mtr_report_test ($) { my ($tinfo)= @_; - _mtr_report_test_name($tinfo); + my $test_name = _mtr_report_test_name($tinfo); my $comment= $tinfo->{'comment'}; my $logfile= $tinfo->{'logfile'}; my $warnings= $tinfo->{'warnings'}; my $result= $tinfo->{'result'}; + my $retry= $tinfo->{'retries'} ? "retry-" : ""; if ($result eq 'MTR_RES_FAILED'){ my $timest = format_time(); + my $fail = "fail"; + + if ( $::opt_experimental ) + { + # Find out if this test case is an experimental one, so we can treat + # the failure as an expected failure instead of a regression. + for my $exp ( @$::experimental_test_cases ) { + if ( $exp ne $test_name ) { + # if the expression is not the name of this test case, but has + # an asterisk at the end, determine if the characters up to + # but excluding the asterisk are the same + if ( $exp ne "" && substr($exp, -1, 1) eq "*" ) { + $exp = substr($exp, 0, length($exp) - 1); + if ( substr($test_name, 0, length($exp)) ne $exp ) { + # no match, try next entry + next; + } + # if yes, fall through to set the exp-fail status + } else { + # no match, try next entry + next; + } + } + $fail = "exp-fail"; + last; + } + } if ( $warnings ) { - mtr_report("[ fail ] Found warnings/errors in server log file!"); + mtr_report("[ $retry$fail ] Found warnings/errors in server log file!"); mtr_report(" Test ended at $timest"); mtr_report($warnings); return; @@ -126,14 +156,14 @@ sub mtr_report_test ($) { my $timeout= $tinfo->{'timeout'}; if ( $timeout ) { - mtr_report("[ fail ] timeout after $timeout seconds"); + mtr_report("[ $retry$fail ] timeout after $timeout seconds"); mtr_report(" Test ended at $timest"); mtr_report("\n$tinfo->{'comment'}"); return; } else { - mtr_report("[ fail ]\n Test ended at $timest"); + mtr_report("[ $retry$fail ]\n Test ended at $timest"); } if ( $logfile ) @@ -176,7 +206,7 @@ sub mtr_report_test ($) { { my $timer_str= $tinfo->{timer} || ""; $tot_real_time += ($timer_str/1000); - mtr_report("[ pass ] ", sprintf("%5s", $timer_str)); + mtr_report("[ ${retry}pass ] ", sprintf("%5s", $timer_str)); # Show any problems check-testcase found if ( defined $tinfo->{'check'} ) |