Load only tested plugins when invoked with -test

By default, a clean settings path is used for test environment.

All the default plugins are loaded, although they're not needed.

This change significantly improves loading time for tests.

Change-Id: I24254f3e538e3f0e6d233d0989738dc1ce238209
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@theqtcompany.com>
Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com>
This commit is contained in:
Orgad Shaneh
2015-03-04 09:25:08 +02:00
committed by Eike Ziller
parent da67c7c6c9
commit 044eeacde5
14 changed files with 95 additions and 7 deletions
+15 -2
View File
@@ -199,8 +199,9 @@
\row
\li Type
\li String
\li Optional. Value \c Required or \c Optional. Defines if the dependency is
a hard requirement or optional. Defaults to \c{Required}.
\li Optional. Value \c Required, \c Optional, or \c Test. Defines if the dependency is
a hard requirement, optional, or required for running the plugin's tests.
Defaults to \c{Required}.
\endtable
\section3 Optional Dependencies
@@ -223,6 +224,18 @@
ExtensionSystem::PluginManager::getObjectByClassName(), and use QMetaObject functions to call
functions on it.
\section3 Test Dependencies
When the user runs the application with the \c{-test} command line argument, only
the specified plugins and their dependencies are loaded. This is done in order to
speed up the execution of tests by avoiding the loading of unneeded plugins.
A plugin can specify additional dependencies that are required for running its
tests, but not for its normal execution, by declaring dependencies with
\c {"Type" : "Test"}. Test dependencies are force loaded, and do not affect load order.
This type of dependency is not transitive.
\section2 Command Line Arguments
Plugins can register command line arguments that the user can give