Commit bbdd0576 authored by Magnus Svensson's avatar Magnus Svensson

WL#4189 mtr.pl v2

 - Clear test variables "comment" and "logfile" to make sure thay aren't
  already set from previous run of same test
 - Print warning if test result already set and set it anyway
parent 0cb63777
...@@ -91,11 +91,14 @@ sub mtr_report_test_passed ($) { ...@@ -91,11 +91,14 @@ sub mtr_report_test_passed ($) {
$tinfo->{timer}= $timer_str; $tinfo->{timer}= $timer_str;
} }
# Set as passed unless already set # Big warning if status already set
if ( not defined $tinfo->{'result'} ){ if ( $tinfo->{'result'} ){
$tinfo->{'result'}= 'MTR_RES_PASSED'; mtr_warning("mtr_report_test_passed: Test result",
"already set to '", $tinfo->{'result'}, ",");
} }
$tinfo->{'result'}= 'MTR_RES_PASSED';
mtr_report_test($tinfo); mtr_report_test($tinfo);
} }
......
...@@ -698,6 +698,12 @@ sub run_worker ($) { ...@@ -698,6 +698,12 @@ sub run_worker ($) {
if ($line eq 'TESTCASE'){ if ($line eq 'TESTCASE'){
my $test= My::Test::read_test($server); my $test= My::Test::read_test($server);
#$test->print_test(); #$test->print_test();
# Clear comment and logfile, to avoid
# reusing them from previous test
delete($test->{'comment'});
delete($test->{'logfile'});
run_testcase($test); run_testcase($test);
#$test->{result}= 'MTR_RES_PASSED'; #$test->{result}= 'MTR_RES_PASSED';
# Send it back, now with results set # Send it back, now with results set
......
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