Commit 29e8c154 authored by Anel Husakovic's avatar Anel Husakovic

MDEV-25857: MTR should report at least last test that was executed in case of...

MDEV-25857: MTR should report at least last test that was executed in case of shutdown and not-completed

- Report the test name in case not all tests are completed and server
closed the connection
- Rerport the failure of the last test with the server log in case of
server shutdown.
- Ignore stackdump files (obtained on Windows).

Reviewed by: wlad@mariadb.com
parent 8b02e02b
......@@ -505,6 +505,7 @@ _UpgradeReport_Files/
Backup*/
UpgradeLog*.XML
UpgradeLog*.htm
*.stackdump
# SQL Server files
*.mdf
......
......@@ -509,6 +509,12 @@ sub main {
}
if ( not @$completed ) {
my $test_name= mtr_grab_file($path_current_testlog);
$test_name =~ s/^CURRENT_TEST:\s//;
my $tinfo = My::Test->new(name => $test_name);
$tinfo->{result}= 'MTR_RES_FAILED';
$tinfo->{logfile}=$path_current_testlog;
mtr_report_test($tinfo);
mtr_error("Test suite aborted");
}
......@@ -5080,6 +5086,15 @@ sub mysqld_start ($$) {
$opt_start_timeout, $mysqld->{'proc'}, $warn_seconds))
{
my $mname= $mysqld->name();
# Report failure about the last test case before exit
my $test_name= mtr_grab_file($path_current_testlog);
$test_name =~ s/^CURRENT_TEST:\s//;
my $tinfo = My::Test->new(name => $test_name);
$tinfo->{result}= 'MTR_RES_FAILED';
$tinfo->{failures}= 1;
$tinfo->{logfile}=get_log_from_proc($mysqld->{'proc'}, $tinfo->{name});
report_option('verbose', 1);
mtr_report_test($tinfo);
mtr_error("Failed to start mysqld $mname with command $exe");
}
......
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