performance optimization breaks tests

Milian Wolff mail at milianw.de
Sun Nov 4 14:16:59 UTC 2012


On Sunday 04 November 2012 10:39:16 Andreas Pakulat wrote:
> Hi,
> 
> the recent optimization of using IndexedString in the project API
> breaks ui-tests. Or rather it makes it necessary to have anything that
> uses TestProject also create the complete kdevplatform shell. This is
> not good, tests should be easy to setup, extend, maintain and run and
> requiring a Core for a simple test-app is a major downside IMHO.

I agree, but if the gain for the full application by far exceeds the gain, 
then I think we have no other option.

Though, which "recent" optimization are you talking about exactly?

0df2338560cc6f0ca239a31e561c76d5789d3443 <-- that was recent but is not 
actually introducing anything new. Do you mean 
acabbf5b22030266968bb60a3ae50109c92c00f6 ? That's around since one year 
already, so I wonder if you mean that by recent :]

> I noticed this regression with the ui-testapp I've written to test
> ui-changes in the kcm for project-managers/custom-buildsystem. It
> crashes now because suddenly an itemrepository is required for a
> TestProject and this requires Core etc. to be setup.
> 
> Any ideas how to fix that (without re-introducing the memory overhead
> again)?

Yes, setup the test core, it's a matter of a few lines of code. Then for speed 
you might want to disable all plugins, see TestPluginController and 
bf3c04a9ff7387e8653ecbd7bf181582b8bd7eef for how to do that. In the future, I 
want to enable this by default, i.e.: do not load any plugins in the tests. 
Then each test will have to manually specify which one it wants to load - if 
it needs any at all.

Cheers
-- 
Milian Wolff
mail at milianw.de
http://milianw.de
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part.
URL: <http://mail.kde.org/pipermail/kdevelop-devel/attachments/20121104/f7de3051/attachment.sig>


More information about the KDevelop-devel mailing list