[RFC] change test output to subunit when stdout is a pipe
Robert Collins
robertc at robertcollins.net
Mon Jul 20 08:21:50 BST 2009
On Mon, 2009-07-20 at 17:03 +1000, Martin Pool wrote:
>
> I used it for the last test run I did and will keep using it as the
> default for a while.
>
> The first thing I noticed is that it loses the elapsed time measure.
Coincidentally my current project in subunit is making using of the
time: feature. https://lists.launchpad.net/subunit-dev/msg00016.html
> So far I think on the whole it's not that bad, but it doesn't compare
> well to our default.
>
> I can see some cases where redirection into a file rather than on a
> terminal should change default behaviour - for instance, from the
> recent thread, that it shouldn't show the progress bar. I think using
> an entirely different format seems like too large of a change. Would
> it be enough to just give --subunit a short name?
I'm happy typing --subunit always. The main reason to change would be so
that when someone redirects to a file, to attach to a bug, they get a
more robust trace.
> Is there a larger story around why you're often redirecting the
> output?
I redirect for several reasons:
- to capture for sharing with others
- to generate test lists to run on ec2
- as part of my shrinking-failure workflow:
selftest --subunit | subunit-filter --no-skips | tee failing.log |
subunit2pyunit
cat failing.log | subunit-ls > failing.list
# hack on a failed test
selftest --load-list failing.list --subunit | ...
# repeat until nothing is failing
-Rob
-------------- 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/eced5bd8/attachment.pgp
More information about the bazaar
mailing list