[RFC] change test output to subunit when stdout is a pipe

Robert Collins robertc at robertcollins.net
Mon Jul 20 05:48:28 BST 2009

On Mon, 2009-07-20 at 14:23 +1000, Martin Pool wrote:
> 2009/7/20 Robert Collins <robertc at robertcollins.net>:
> > I've noticed that these days I always do the following two things at the
> > same time, or not at all:
> > bzr selftest --subunit
> > bzr selftest > tests.log
> >
> > by which I mean, I never record test output except in subunit format,
> > and I never [interactively] use subunit format except when recording
> > test output.
> >
> > Would anyone object to a heuristic in bzr selftest to use subunit format
> > when stdout is a pipe?
> I do record it in the default format.
> At the moment subunit format has an external dependency.  Users run
> bzr selftests and report the results.  I would think twice before
> making that harder.  (Though installing one more Python module is not
> that much harder, so not out of the question.)

We could embed a copy of subunit; its also GPL, and quite small.

> Would it be reasonable to just always use it?  I thought it was meant
> to be human readable, so would it be reasonable to use subunit format
> always, or could we use a reasonable variation of it that eg only
> includes failures?

Human readable and pretty-to-read are different qualities. subunit is
human readable, but also has metadata that makes it more noisy than our
current pretty printer. It also is a streaming format so it doesn't do
the 'summary and then details' separation we do. I'm planning on
teaching subunit to gather more data as well, which will make using it
as the default less appealing, I suspect. OTOH, perhaps it would be ok -
why not give it a go and see what you think?

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: This is a digitally signed message part
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20090720/36fb03cc/attachment.pgp 

More information about the bazaar mailing list