1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-29 05:21:33 +03:00

WL #5680 MTR results written to file with well defined format

Added --result-file option, which will produce var/mtr-results.txt
Output has a simple format:

<tag> : <value>  for general info on test run
{
  <tag> : <value>
  ....
}                for each test

Output from failed tests are included but may be truncated.
See WL for more details.
This commit is contained in:
Bjorn Munch
2011-05-09 16:07:43 +02:00
parent 4f3c366e58
commit cb15b0712d
5 changed files with 276 additions and 6 deletions

View File

@ -34,6 +34,7 @@ use My::Platform;
use POSIX qw[ _exit ];
use IO::Handle qw[ flush ];
require "mtr_io.pl";
use mtr_results;
my $tot_real_time= 0;
@ -96,6 +97,7 @@ sub mtr_report_test_passed ($) {
{
$timer_str= mtr_fromfile("$::opt_vardir/log/timer");
$tinfo->{timer}= $timer_str;
resfile_test_info('duration', $timer_str) if $::opt_resfile;
}
# Big warning if status already set
@ -301,6 +303,7 @@ sub mtr_report_stats ($$;$) {
time - $BASETIME, "seconds executing testcases");
}
resfile_global("duration", time - $BASETIME) if $::opt_resfile;
my $warnlog= "$::opt_vardir/log/warnings";
if ( -f $warnlog )