Commit 43dc4233 authored by Monty's avatar Monty Committed by Sergei Petrunia

Fixed 'undefined variable' error in mtr

This could happen if mtr_grab_file() returned empty (happened to me)
parent e4fbec14
......@@ -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");
}
......
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