mirror of
https://github.com/MariaDB/server.git
synced 2025-01-16 03:52:35 +01:00
merge 49672
This commit is contained in:
commit
d3c57be834
1 changed files with 15 additions and 1 deletions
|
@ -3502,7 +3502,7 @@ sub run_testcase ($) {
|
|||
{
|
||||
# mysqltest failed, probably crashed
|
||||
$tinfo->{comment}=
|
||||
"mysqltest failed with unexpected return code $res";
|
||||
"mysqltest failed with unexpected return code $res\n";
|
||||
report_failure_and_restart($tinfo);
|
||||
}
|
||||
|
||||
|
@ -4093,6 +4093,20 @@ sub report_failure_and_restart ($) {
|
|||
# about what failed has been saved to file. Save the report
|
||||
# in tinfo
|
||||
$tinfo->{logfile}= mtr_fromfile($logfile);
|
||||
# If no newlines in the test log:
|
||||
# (it will contain the CURRENT_TEST written by mtr, so is not empty)
|
||||
if ($tinfo->{logfile} !~ /\n/)
|
||||
{
|
||||
# Show how far it got before suddenly failing
|
||||
$tinfo->{comment}.= "mysqltest failed but provided no output\n";
|
||||
my $log_file_name= $opt_vardir."/log/".$tinfo->{shortname}.".log";
|
||||
if (-e $log_file_name) {
|
||||
$tinfo->{comment}.=
|
||||
"The result from queries just before the failure was:".
|
||||
"\n< snip >\n".
|
||||
mtr_lastlinesfromfile($log_file_name, 20)."\n";
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue