Browse Source

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
pull/1846/head
Anel Husakovic 4 years ago
parent
commit
29e8c15417
  1. 1
      .gitignore
  2. 15
      mysql-test/mysql-test-run.pl

1
.gitignore

@ -505,6 +505,7 @@ _UpgradeReport_Files/
Backup*/
UpgradeLog*.XML
UpgradeLog*.htm
*.stackdump
# SQL Server files
*.mdf

15
mysql-test/mysql-test-run.pl

@ -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");
}

Loading…
Cancel
Save