diff options
author | Monty <monty@mariadb.org> | 2022-12-20 13:37:32 +0200 |
---|---|---|
committer | Sergei Petrunia <sergey@mariadb.com> | 2023-02-03 14:33:32 +0300 |
commit | 43dc42334de9b240506493044a0a54333c99d8db (patch) | |
tree | 60dbc228330aa6a3123948f98487513bea698096 | |
parent | e4fbec1463bdf71482a2c9cd2b69b1a10b3c52ec (diff) | |
download | mariadb-git-43dc42334de9b240506493044a0a54333c99d8db.tar.gz |
Fixed 'undefined variable' error in mtr
This could happen if mtr_grab_file() returned empty (happened to me)
-rwxr-xr-x | mysql-test/mariadb-test-run.pl | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/mysql-test/mariadb-test-run.pl b/mysql-test/mariadb-test-run.pl index b75278e9a6d..5ab50a4f88b 100755 --- a/mysql-test/mariadb-test-run.pl +++ b/mysql-test/mariadb-test-run.pl @@ -516,12 +516,15 @@ sub main { if ( not @$completed ) { my $test_name= mtr_grab_file($path_testlog); - $test_name =~ s/^CURRENT_TEST:\s//; - chomp($test_name); - my $tinfo = My::Test->new(name => $test_name); - $tinfo->{result}= 'MTR_RES_FAILED'; - $tinfo->{comment}=' '; - mtr_report_test($tinfo); + if (defined($test_name)) + { + $test_name =~ s/^CURRENT_TEST:\s//; + chomp($test_name); + my $tinfo = My::Test->new(name => $test_name); + $tinfo->{result}= 'MTR_RES_FAILED'; + $tinfo->{comment}=' '; + mtr_report_test($tinfo); + } mtr_error("Test suite aborted"); } |