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

John Arbash Meinel john at arbash-meinel.com
Thu May 1 17:21:50 BST 2008


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Martin Pool wrote:
| 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?

You could make it "--starting-with=" and have a short alias of "-s".

|  * similarly, I don't want to retype 'bzrlib.tests' every time, could
| that be presumed, if the name is not already matched.

I suppose there is some small issues with matching plugin tests versus bzrlib.tests.

Since plugin tests are generally "bzrlib.plugins.PLUGIN_NAME.*"
This code is certainly bzrlib specific, though, so some way of doing that would
be nice. (in my mind it would be done in cmd_XXX so that the regular test
infrastructure wouldn't need to know about it.)

|  * 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.

Shouldn't it already?
|
|>  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.
|

John
=:->
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (Cygwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAkgZ7h4ACgkQJdeBCYSNAANPKQCgsIaQ0rhxUpsg/t7Y0lxSgosb
/jwAmgL79QLD7zCWMnIuOjK3Yfp1u2V0
=KzZ9
-----END PGP SIGNATURE-----



More information about the bazaar mailing list