← Back to team overview

launchpad-dev team mailing list archive

Re: Bzr plugin for guessing relevant test modules: Fault line

 

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.

Cheers,

Jelmer

Attachment: signature.asc
Description: This is a digitally signed message part


Follow ups

References