Targeted unit testing pre-push
Andrew Wilkins
andrew.wilkins at canonical.com
Mon Feb 10 09:32:18 UTC 2014
Hi folks,
When I'm about to propose or land something, I'll typically run "make
check", or just "go test ./..." to ensure I haven't broken some far-away
package. This can be quite slow, unnecessarily so if the packages changed
don't feature in the dependencies of some of our longer running tests.
I possibly reinvented the wheel, but I've just written a simple program to
filter a package list by those that depend on a specified list of packages.
You can get it here: https://github.com/axw/rdep
For example, I just modified the environs and provider/manual packages in a
WIP. From the juju-core directory, I run
rdep -tests ./... ./environs/ ./provider/manual | xargs go test
and this ran tests for 39 packages rather than 155.
I may or may not write another tool at some point to list which packages
have changed since a specified rev, but it's easy enough to do that bit by
hand (bzr status -r -N).
Cheers,
Andrew
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ubuntu.com/archives/juju-dev/attachments/20140210/72f12a55/attachment.html>
More information about the Juju-dev
mailing list