56
56
if defined $tinfo->{combination};
59
printf "%-30s ", $tname;
60
printf "test: $tname\n";
62
printf "%-30s ", $tname;
62
66
sub mtr_report_test_skipped ($) {
68
my $tname= $tinfo->{name};
65
71
$tinfo->{'result'}= 'MTR_RES_SKIPPED';
66
72
if ( $tinfo->{'disable'} )
68
mtr_report("[ disabled ] $tinfo->{'comment'}");
70
elsif ( $tinfo->{'comment'} )
72
mtr_report("[ skipped ] $tinfo->{'comment'}");
76
mtr_report("[ skipped ]");
80
if ( $tinfo->{'comment'} )
83
mtr_report("skip: $tname [\ncause: $cause\n$tinfo->{'comment'}\n]");
85
mtr_report("[ $cause ] $tinfo->{'comment'}");
91
mtr_report("skip: $tname");
93
mtr_report("[ $cause ]");
103
122
$timer= mtr_fromfile("$::opt_vardir/log/timer");
104
123
$tot_real_time += ($timer/1000);
105
124
$timer= sprintf "%12s", $timer;
125
### XXX: How to format this as iso6801 datetime?
107
127
$tinfo->{'result'}= 'MTR_RES_PASSED';
108
mtr_report("[ pass ] $timer");
128
if ($::opt_subunit) {
129
mtr_report("success: $tname");
131
mtr_report("[ pass ] $timer");
111
135
sub mtr_report_test_failed ($) {
112
136
my $tinfo= shift;
137
my $tname= $tinfo->{name};
114
140
$tinfo->{'result'}= 'MTR_RES_FAILED';
115
141
if ( defined $tinfo->{'timeout'} )
117
mtr_report("[ fail ] timeout");
122
mtr_report("[ fail ]");
125
if ( $tinfo->{'comment'} )
143
$comment.= "timeout";
145
elsif ( $tinfo->{'comment'} )
127
147
# The test failure has been detected by mysql-test-run.pl
128
148
# when starting the servers or due to other error, the reason for
129
149
# failing the test is saved in "comment"
130
mtr_report("\nERROR: $tinfo->{'comment'}");
150
$comment.= "$tinfo->{'comment'}";
132
152
elsif ( -f $::path_timefile )
134
154
# Test failure was detected by test tool and it's report
135
155
# about what failed has been saved to file. Display the report.
137
print mtr_fromfile($::path_timefile); # FIXME print_file() instead
156
$comment.= mtr_fromfile($::path_timefile);
142
160
# Neither this script or the test tool has recorded info
143
161
# about why the test has failed. Should be debugged.
144
mtr_report("\nUnexpected termination, probably when starting mysqld");;
162
$comment.= "Unexpected termination, probably when starting mysqld";
164
if ($::opt_subunit) {
165
mtr_report("failure: $tname [\n$comment\n]");
167
mtr_report("[ fail ] $comment");