~launchpad/subunit/launchpad-ppa-hardy

« back to all changes in this revision

Viewing changes to README

  • Committer: Bazaar Package Importer
  • Author(s): Robert Collins
  • Date: 2009-12-20 16:33:29 UTC
  • mfrom: (1.1.3 upstream) (3.2.3 sid)
  • Revision ID: james.westby@ubuntu.com-20091220163329-o60chash60h5zzj2
Tags: 0.0.4-4
Upstream bugfix for FTBFS on test_child.c.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
 
2
2
  subunit: A streaming protocol for test results
3
 
  Copyright (C) 2005  Robert Collins <robertc@robertcollins.net>
4
 
 
5
 
  This program is free software; you can redistribute it and/or modify
6
 
  it under the terms of the GNU General Public License as published by
7
 
  the Free Software Foundation; either version 2 of the License, or
8
 
  (at your option) any later version.
9
 
 
10
 
  This program is distributed in the hope that it will be useful,
11
 
  but WITHOUT ANY WARRANTY; without even the implied warranty of
12
 
  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13
 
  GNU General Public License for more details.
14
 
 
15
 
  You should have received a copy of the GNU General Public License
16
 
  along with this program; if not, write to the Free Software
17
 
  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
18
 
 
 
3
  Copyright (C) 2005-2009 Robert Collins <robertc@robertcollins.net>
 
4
 
 
5
  Licensed under either the Apache License, Version 2.0 or the BSD 3-clause
 
6
  license at the users choice. A copy of both licenses are available in the
 
7
  project source as Apache-2.0 and BSD. You may not use this file except in
 
8
  compliance with one of these two licences.
 
9
  
 
10
  Unless required by applicable law or agreed to in writing, software
 
11
  distributed under these licenses is distributed on an "AS IS" BASIS, WITHOUT
 
12
  WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.  See the
 
13
  license you chose for the specific language governing permissions and
 
14
  limitations under that license.
 
15
 
 
16
  See the COPYING file for full details on the licensing of Subunit.
19
17
 
20
18
  subunit reuses iso8601 by Michael Twomey, distributed under an MIT style
21
19
  licence - see python/iso8601/LICENSE for details.
22
20
 
23
 
 
24
21
Subunit
25
22
-------
26
23
 
88
85
C++
89
86
===
90
87
 
91
 
C++ uses the C bindings and includes a patch for cppunit. See 'c++/README' for
92
 
details.
 
88
The C library is includable and usable directly from C++. A TestListener for
 
89
CPPUnit is included in the Subunit distribution. See 'c++/README' for details.
93
90
 
94
91
shell
95
92
=====
137
134
 
138
135
Subunit protocol description
139
136
============================
 
137
 
 
138
This description is being ported to an EBNF style. Currently its only partly in
 
139
that style, but should be fairly clear all the same. When in doubt, refer the
 
140
source (and ideally help fix up the description!). Generally the protocol is
 
141
line orientated and consists of either directives and their parameters, or
 
142
when outside a DETAILS region unexpected lines which are not interpreted by
 
143
the parser - they should be forwarded unaltered.
 
144
 
140
145
test|testing|test:|testing: test label
141
146
success|success:|successful|successful: test label
142
 
success|success:|successful|successful: test label [
143
 
...
144
 
]
145
 
failure test label
 
147
success|success:|successful|successful: test label DETAILS
146
148
failure: test label
147
 
failure test label [
148
 
...
149
 
]
150
 
failure: test label [
151
 
...
152
 
]
 
149
failure: test label DETAILS
153
150
error: test label
154
 
error: test label [
155
 
]
 
151
error: test label DETAILS
156
152
skip[:] test label
157
 
skip[:] test label [
158
 
]
 
153
skip[:] test label DETAILS
159
154
xfail[:] test label
160
 
xfail[:] test label [
161
 
]
 
155
xfail[:] test label DETAILS
162
156
progress: [+|-]X
163
157
progress: push
164
158
progress: pop
165
159
tags: [-]TAG ...
166
160
time: YYYY-MM-DD HH:MM:SSZ
 
161
 
 
162
DETAILS ::= BRACKETED | MULTIPART
 
163
BRACKETED ::= '[' CR lines ']' CR
 
164
MULTIPART ::= '[ multipart' CR PART* ']' CR
 
165
PART ::= PART_TYPE CR NAME CR PART_BYTES CR
 
166
PART_TYPE ::= Content-Type: type/sub-type(;parameter=value,parameter=value)
 
167
PART_BYTES ::= (DIGITS CR LF BYTE{DIGITS})* '0' CR LF
 
168
 
167
169
unexpected output on stdout -> stdout.
168
170
exit w/0 or last test completing -> error
169
171
 
189
191
environments - such as those that organise tests into suites - the top-most
190
192
runner can report on the number of suites, and each suite surround its output
191
193
with a (push, pop) pair. Interpreters should interpret a pop as also advancing
192
 
the progress of the restored level by one step.
 
194
the progress of the restored level by one step. Encountering progress
 
195
directives between the start and end of a test pair indicates that a previous
 
196
test was interrupted and did not cleanly terminate: it should be implicitly
 
197
closed with an error (the same as when a stream ends with no closing test
 
198
directive for the most recently started test).
193
199
 
194
200
The time directive acts as a clock event - it sets the time for all future
195
201
events. The value should be a valid ISO8601 time.