mirror of
https://github.com/MariaDB/server.git
synced 2026-05-10 00:54:30 +02:00
MDEV-22631 some test causes MTR interruption without generating summary and XML
This commit is contained in:
parent
44c8d84908
commit
e9a33a5392
2 changed files with 11 additions and 3 deletions
|
|
@ -473,7 +473,7 @@ sub mtr_report_stats ($$$$) {
|
|||
$comment =~ s/[\"]//g;
|
||||
|
||||
# if a test case has to be retried it should have the result MTR_RES_FAILED in jUnit XML
|
||||
if ($test->{'result'} eq "MTR_RES_FAILED" || $test->{'retries'}) {
|
||||
if ($test->{'result'} eq "MTR_RES_FAILED" || $test->{'retries'} > 0) {
|
||||
my $logcontents = $test->{'logfile-failed'} || $test->{'logfile'};
|
||||
|
||||
$xml_report .= qq(>\n\t\t\t<failure message="" type="MTR_RES_FAILED">\n<![CDATA[$logcontents]]>\n\t\t\t</failure>\n\t\t</testcase>\n);
|
||||
|
|
@ -639,6 +639,8 @@ sub mtr_error (@) {
|
|||
}
|
||||
else
|
||||
{
|
||||
use Carp qw(cluck);
|
||||
cluck "Error happened" if $verbose > 0;
|
||||
exit(1);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -769,8 +769,14 @@ sub run_test_server ($$$) {
|
|||
if ( $result->is_failed() ) {
|
||||
my $worker_logdir= $result->{savedir};
|
||||
my $log_file_name=dirname($worker_logdir)."/".$result->{shortname}.".log";
|
||||
$result->{'logfile-failed'} = mtr_lastlinesfromfile($log_file_name, 20);
|
||||
rename $log_file_name,$log_file_name.".failed";
|
||||
|
||||
if (-e $log_file_name) {
|
||||
$result->{'logfile-failed'} = mtr_lastlinesfromfile($log_file_name, 20);
|
||||
} else {
|
||||
$result->{'logfile-failed'} = "";
|
||||
}
|
||||
|
||||
rename $log_file_name, $log_file_name.".failed";
|
||||
}
|
||||
delete($result->{result});
|
||||
$result->{retries}= $retries+1;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue