[Launchpad-dev] Bzr plugin for guessing relevant test modules: Fault line

Jelmer Vernooij jelmer at canonical.com
Wed Jun 1 11:05:58 UTC 2011

On Tue, 2011-05-31 at 10:51 -0400, Aaron Bentley wrote:
> I've hacked up a bzr plugin for guessing which test modules you should
> run considering the files you've changed.
> https://launchpad.net/fault-line
> To install:
> bzr branch lp:fault-line ~/.bazaar/plugins/faultline -Derror
> It works by looking at previous revisions where the file was changed,
> and seeing what test files were changed at the same time.  You can
> specify the files, or it will autodetect them by looking at your working
> tree.
> e.g.
> $ bzr faultline
> lib/lp/soyuz/test /test_archive.py
> lib/lp/soyuz/scripts/tests/test_copypackage.py
> lib/lp/soyuz/browser/tests/test_archive_webservice.py
> lib/lp/code/windmill/tests/test_recipe_request_build.py
> It's intended to work with the Launchpad codebase, and assumes files
> whose names start with "test_" are test modules.
That's a very nice idea.

I've hacked on an extension that adds wraps 'bzr selftest' and adds a
--auto argument, which makes selftest use faultline to determine the
tests to run. It's a bit hackish, but it does appear to work.


-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: This is a digitally signed message part
URL: <https://lists.ubuntu.com/archives/bazaar/attachments/20110601/e73e1693/attachment.pgp>

More information about the bazaar mailing list