~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to tests/lib/mtr_report.pl

  • Committer: Monty Taylor
  • Date: 2009-08-04 19:06:17 UTC
  • mto: This revision was merged to the branch mainline in revision 1110.
  • Revision ID: mordred@inaugust.com-20090804190617-wb7dhmug7jjn7nuw
Made subunit output optional.

Show diffs side-by-side

added added

removed removed

Lines of Context:
56
56
    if defined $tinfo->{combination};
57
57
 
58
58
  _mtr_log($tname);
59
 
  printf "test: $tname\n";
 
59
  if ($::opt_subunit) {
 
60
    printf "test: $tname\n";
 
61
  } else {
 
62
    printf "%-30s ", $tname;
 
63
  }
60
64
}
61
65
 
62
66
sub mtr_report_test_skipped ($) {
75
79
  }
76
80
  if ( $tinfo->{'comment'} )
77
81
  {
78
 
    mtr_report("skip: $tname [\ncause: $cause\n$tinfo->{'comment'}\n]");
 
82
    if ($::opt_subunit) {
 
83
      mtr_report("skip: $tname [\ncause: $cause\n$tinfo->{'comment'}\n]");
 
84
    } else { 
 
85
      mtr_report("[ $cause ]   $tinfo->{'comment'}");
 
86
    }
79
87
  }
80
88
  else
81
89
  {
82
 
    mtr_report("skip: $tname");
 
90
    if ($::opt_subunit) {
 
91
      mtr_report("skip: $tname");
 
92
    } else {
 
93
      mtr_report("[ $cause ]");
 
94
    }
83
95
  }
84
96
}
85
97
 
113
125
    ### XXX: How to format this as iso6801 datetime?
114
126
  }
115
127
  $tinfo->{'result'}= 'MTR_RES_PASSED';
116
 
  mtr_report("success: $tname");
 
128
  if ($::opt_subunit) {
 
129
    mtr_report("success: $tname");
 
130
  } else {
 
131
    mtr_report("[ pass ]   $timer");
 
132
  }
117
133
}
118
134
 
119
135
sub mtr_report_test_failed ($) {
145
161
    # about why the test has failed. Should be debugged.
146
162
    $comment.= "Unexpected termination, probably when starting mysqld";
147
163
  }
148
 
  mtr_report("failure: $tname [\n$comment\n]");
 
164
  if ($::opt_subunit) {
 
165
    mtr_report("failure: $tname [\n$comment\n]");
 
166
  } else {
 
167
    mtr_report("[ fail ]   $comment");
 
168
  }
149
169
}
150
170
 
151
171
sub mtr_report_stats ($) {