Remove warnings

Set comment properly before calling mtr_report_test failed and report_failure_restart 
parent 3f46c5cd
...@@ -130,16 +130,11 @@ sub mtr_report_test_failed ($) { ...@@ -130,16 +130,11 @@ sub mtr_report_test_failed ($) {
my $tinfo= shift; my $tinfo= shift;
$tinfo->{'result'}= 'MTR_RES_FAILED'; $tinfo->{'result'}= 'MTR_RES_FAILED';
if ( $tinfo->{'timeout'} ) if ( defined $tinfo->{'timeout'} )
{ {
print "[ fail ] timeout\n"; print "[ fail ] timeout\n";
return; return;
} }
elsif ( $tinfo->{'ndb_test'} and $::cluster->[0]->{'installed_ok'} eq "NO")
{
print "[ fail ] ndbcluster start failure\n";
return;
}
else else
{ {
print "[ fail ]\n"; print "[ fail ]\n";
......
...@@ -2755,10 +2755,9 @@ sub run_testcase_check_skip_test($) ...@@ -2755,10 +2755,9 @@ sub run_testcase_check_skip_test($)
# If test needs this cluster, check it was installed ok # If test needs this cluster, check it was installed ok
if ( !$cluster->{'installed_ok'} ) if ( !$cluster->{'installed_ok'} )
{ {
mtr_tofile($path_timefile,
"Test marked as failed because $cluster->{'name'} " .
"was not installed ok!");
mtr_report_test_name($tinfo); mtr_report_test_name($tinfo);
$tinfo->{comment}=
"Cluster $cluster->{'name'} was not installed ok";
mtr_report_test_failed($tinfo); mtr_report_test_failed($tinfo);
return 1; return 1;
} }
...@@ -2881,10 +2880,8 @@ sub run_testcase ($) { ...@@ -2881,10 +2880,8 @@ sub run_testcase ($) {
# Can't restart a running server that may be in use # Can't restart a running server that may be in use
if ( $glob_use_running_server ) if ( $glob_use_running_server )
{ {
$tinfo->{'skip'}= 1;
$tinfo->{'comment'}= "Can't restart a running server";
mtr_report_test_name($tinfo); mtr_report_test_name($tinfo);
$tinfo->{comment}= "Can't restart a running server";
mtr_report_test_skipped($tinfo); mtr_report_test_skipped($tinfo);
return; return;
} }
...@@ -2934,16 +2931,16 @@ sub run_testcase ($) { ...@@ -2934,16 +2931,16 @@ sub run_testcase ($) {
$tinfo->{'timeout'}= 1; # Mark as timeout $tinfo->{'timeout'}= 1; # Mark as timeout
report_failure_and_restart($tinfo); report_failure_and_restart($tinfo);
} }
elsif ( $res == 1 )
{
# Test case failure reported by mysqltest
report_failure_and_restart($tinfo);
}
else else
{ {
# Test case failed, if in control mysqltest returns 1 # mysqltest failed, probably crashed
if ( $res != 1 ) $tinfo->{comment}=
{ "mysqltest returned unexpected code $res, it has probably crashed";
mtr_tofile($path_timefile,
"mysqltest returned unexpected code $res, " .
"it has probably crashed");
}
report_failure_and_restart($tinfo); report_failure_and_restart($tinfo);
} }
......
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