[MERGE] Speedup selftest by loading a previously saved test list
Robert Collins
robertc at robertcollins.net
Wed Jan 23 10:33:35 GMT 2008
bb:approve
This can likely be tweaked to be a bit more understandable, but the code
itself appears solid to me. Another useful tweak would be to allow:
'bzr selftest --module bzrlib.plugins.bzrtools' (for instance) - to use
an id filter supplied on the command line.
-Rob
On Mon, 2008-01-21 at 16:32 +0100, Vincent Ladeuil wrote:
> >>>>> "robert" == Robert Collins <robertc at robertcollins.net> writes:
>
> robert> On Thu, 2008-01-17 at 17:59 +0100, Vincent Ladeuil wrote:
> >>
> >> The problem is to find the right balance between keeping the
> >> parametrization sufficiently opened while still being able to
> >> build the TestCase from the parameters. pickle allowed me to
> >> postpone these choices while implementing the rest.
> >>
> >> I think a promising approach is to save the test name, its
> >> parameters and the associated adapter class name.
>
> robert> I think you missed my point and andrews.
>
> robert> The /only/ data you need is the names/ids to load. From that we can
> robert> build a test suite that contains just those tests, parameterisation is
> robert> the responsibility of the test_suite() interface (and refinements such
> robert> as I did at the end of the year).
>
> robert> Any approach where you use anything other than the name of the test is
> robert> almost guaranteed to be flawed in concept.
>
> So I started again from scratch and instead of trying to build
> the tests explicitly, I know leave each module build its own test
> suite and filtered them afterward. Additionally, to reduce the
> time spent to build the whole test suite, I *don't* call the
> test_suite() for a module if no test id begins with its name.
>
> That is still a significant time saving even if less than the
> previous version.
>
> Further savings can be achieved by applying the same approach in
> each test_suite function.
>
> Vincent
>
--
GPG key available at: <http://www.robertcollins.net/keys.txt>.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20080123/6bcff09b/attachment.pgp
More information about the bazaar
mailing list