mirror of
https://github.com/MariaDB/server.git
synced 2025-08-07 00:04:31 +03:00
Tune reporting
This commit is contained in:
@@ -52,7 +52,6 @@ sub report_option {
|
|||||||
#print $name, " setting $opt to ", (defined $value? $value : "undef") ,"\n";
|
#print $name, " setting $opt to ", (defined $value? $value : "undef") ,"\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
sub SHOW_SUITE_NAME() { return 1; };
|
|
||||||
|
|
||||||
sub _mtr_report_test_name ($) {
|
sub _mtr_report_test_name ($) {
|
||||||
my $tinfo= shift;
|
my $tinfo= shift;
|
||||||
@@ -60,67 +59,40 @@ sub _mtr_report_test_name ($) {
|
|||||||
|
|
||||||
return unless defined $verbose;
|
return unless defined $verbose;
|
||||||
|
|
||||||
# Remove suite part of name
|
|
||||||
$tname =~ s/.*\.// unless SHOW_SUITE_NAME;
|
|
||||||
|
|
||||||
# Add combination name if any
|
# Add combination name if any
|
||||||
$tname.= " '$tinfo->{combination}'"
|
$tname.= " '$tinfo->{combination}'"
|
||||||
if defined $tinfo->{combination};
|
if defined $tinfo->{combination};
|
||||||
|
|
||||||
print $name, _timestamp();
|
print $name, _timestamp();
|
||||||
printf "%-30s ", $tname;
|
printf "%-40s ", $tname;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
sub mtr_report_test_skipped ($) {
|
sub mtr_report_test_skipped ($) {
|
||||||
my $tinfo= shift;
|
my ($tinfo)= @_;
|
||||||
_mtr_report_test_name($tinfo);
|
|
||||||
|
|
||||||
$tinfo->{'result'}= 'MTR_RES_SKIPPED';
|
$tinfo->{'result'}= 'MTR_RES_SKIPPED';
|
||||||
if ( $tinfo->{'disable'} )
|
|
||||||
{
|
mtr_report_test($tinfo);
|
||||||
mtr_report("[ disabled ] $tinfo->{'comment'}");
|
|
||||||
}
|
|
||||||
elsif ( $tinfo->{'comment'} )
|
|
||||||
{
|
|
||||||
if ( $tinfo->{skip_detected_by_test} )
|
|
||||||
{
|
|
||||||
mtr_report("[ skip ]. $tinfo->{'comment'}");
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
mtr_report("[ skip ] $tinfo->{'comment'}");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
mtr_report("[ skip ]");
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
sub mtr_report_test_passed ($) {
|
sub mtr_report_test_passed ($) {
|
||||||
my ($tinfo)= @_;
|
my ($tinfo)= @_;
|
||||||
_mtr_report_test_name($tinfo);
|
|
||||||
|
|
||||||
|
# Save the timer value
|
||||||
my $timer_str= "";
|
my $timer_str= "";
|
||||||
if ( $timer and -f "$::opt_vardir/log/timer" )
|
if ( $timer and -f "$::opt_vardir/log/timer" )
|
||||||
{
|
{
|
||||||
$timer_str= mtr_fromfile("$::opt_vardir/log/timer");
|
$timer_str= mtr_fromfile("$::opt_vardir/log/timer");
|
||||||
$tinfo->{timer}= $timer_str;
|
$tinfo->{timer}= $timer_str;
|
||||||
}
|
}
|
||||||
|
|
||||||
# Set as passed unless already set
|
# Set as passed unless already set
|
||||||
if ( not defined $tinfo->{'result'} ){
|
if ( not defined $tinfo->{'result'} ){
|
||||||
$tinfo->{'result'}= 'MTR_RES_PASSED';
|
$tinfo->{'result'}= 'MTR_RES_PASSED';
|
||||||
}
|
}
|
||||||
|
|
||||||
mtr_report("[ pass ] ", sprintf("%12s", $timer_str));
|
mtr_report_test($tinfo);
|
||||||
|
|
||||||
# Show any problems check-testcase found
|
|
||||||
if ( defined $tinfo->{'check'} )
|
|
||||||
{
|
|
||||||
mtr_report($tinfo->{'check'});
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -178,7 +150,7 @@ sub mtr_report_test ($) {
|
|||||||
{
|
{
|
||||||
if ( $tinfo->{skip_detected_by_test} )
|
if ( $tinfo->{skip_detected_by_test} )
|
||||||
{
|
{
|
||||||
mtr_report("[ skip ]. $tinfo->{'comment'}");
|
mtr_report("[ skip ]. $tinfo->{'comment'}");
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -194,7 +166,7 @@ sub mtr_report_test ($) {
|
|||||||
{
|
{
|
||||||
my $timer_str= $tinfo->{timer} || "";
|
my $timer_str= $tinfo->{timer} || "";
|
||||||
$tot_real_time += ($timer_str/1000);
|
$tot_real_time += ($timer_str/1000);
|
||||||
mtr_report("[ pass ] ", sprintf("%12s", $timer_str));
|
mtr_report("[ pass ] ", sprintf("%5s", $timer_str));
|
||||||
|
|
||||||
# Show any problems check-testcase found
|
# Show any problems check-testcase found
|
||||||
if ( defined $tinfo->{'check'} )
|
if ( defined $tinfo->{'check'} )
|
||||||
@@ -202,7 +174,6 @@ sub mtr_report_test ($) {
|
|||||||
mtr_report($tinfo->{'check'});
|
mtr_report($tinfo->{'check'});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -372,14 +343,11 @@ sub mtr_print_thick_line {
|
|||||||
|
|
||||||
sub mtr_print_header () {
|
sub mtr_print_header () {
|
||||||
print "\n";
|
print "\n";
|
||||||
if ( $::opt_timer )
|
printf "TEST";
|
||||||
{
|
print " " x 38;
|
||||||
print "TEST RESULT TIME (ms)\n";
|
print "RESULT ";
|
||||||
}
|
print "TIME (ms)" if $timer;
|
||||||
else
|
print "\n";
|
||||||
{
|
|
||||||
print "TEST RESULT\n";
|
|
||||||
}
|
|
||||||
mtr_print_line();
|
mtr_print_line();
|
||||||
print "\n";
|
print "\n";
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user