[MERGE] Adding --starting-with <test_id> option to selftest make it run 5x faster

Martin Pool mbp at canonical.com
Thu May 1 02:10:57 BST 2008


On Fri, Apr 25, 2008 at 1:39 AM, Vincent Ladeuil <v.ladeuil+lp at free.fr> wrote:
> Build on top of
>
>    http://bundlebuggy.aaronbentley.com/request/%3Cm263ugwhsf.fsf@free.fr%3E
>
>  pending approval, here is something to wet reviewers appetite :-)
>
>  This patch introduce a new option to selftest. By specifying
>  --starting-with <test_id>, only the tests whose ID begins with
>  the provided value will get loaded* and run.

That speedup certainly sounds nice.  In fact I suspect I would use
this almost all the time.

I haven't read the code in detail because John has but:

 * --starting-with is too long for something we'd use all the time.
Would be be too extreme to call it --in/-i?
 * similarly, I don't want to retype 'bzrlib.tests' every time, could
that be presumed, if the name is not already matched.
 * this should be in NEWS
 * probably also in the "how to run tests" section of the developer guide

It would be kind of cool, though certainly not needed now, to have
this also integrate with -f, which I often use, so that the tests you
think are most important get started fast, then everything else runs.

>  It addresses the main limitations of the --load-list option (you
>  *need* a list before using it and it tends to bitrot quickly)

yes, that's great.

>  while still being compatible with it (one use case being a list
>  with all failing tests).

that too would be worth mentioning as a tip in the developer guide.
i'm happy to help with the text if you draft it.

-- 
Martin <http://launchpad.net/~mbp/>



More information about the bazaar mailing list