diff options
author | Tristan Van Berkom <tristan.vanberkom@codethink.co.uk> | 2020-04-24 18:12:54 +0900 |
---|---|---|
committer | Tristan Van Berkom <tristan.vanberkom@codethink.co.uk> | 2020-04-29 16:24:58 +0900 |
commit | d63bd7e9def528d3ed59a2798452ac1da58ebea4 (patch) | |
tree | 05153205e2d5fa8644af7d877319a3cbc0566b68 /tests/frontend | |
parent | 82eb1d4271bb634f248bc9e1770119d2815d7cd6 (diff) | |
download | buildstream-d63bd7e9def528d3ed59a2798452ac1da58ebea4.tar.gz |
Plugin loading refactor, removing all versioning
Plugin format versioning was decided to be removed for local
plugins and any plugins for which we do not load an explicitly
provided plugin. For pip, this will be handled with a standard
distutils/setuptools approach, allowing users to specify pip
style version boundaries in the plugin origins.
This patch refactors plugin loading so that all related code
goes into the private _pluginfactory module, a new small
PluginOrigin type was added to better manipulate loaded
origins.
Test cases have been removed and will be readded in a following
commit, adjusted to new expectations.
Diffstat (limited to 'tests/frontend')
-rw-r--r-- | tests/frontend/configurable_warnings.py | 4 | ||||
-rw-r--r-- | tests/frontend/configuredwarning/project.conf | 4 | ||||
-rw-r--r-- | tests/frontend/consistencyerror/project.conf | 4 | ||||
-rw-r--r-- | tests/frontend/mirror.py | 2 | ||||
-rw-r--r-- | tests/frontend/push.py | 2 |
5 files changed, 7 insertions, 9 deletions
diff --git a/tests/frontend/configurable_warnings.py b/tests/frontend/configurable_warnings.py index e61db6c37..53409a512 100644 --- a/tests/frontend/configurable_warnings.py +++ b/tests/frontend/configurable_warnings.py @@ -18,9 +18,7 @@ def get_project(fatal_warnings): "name": "test", "min-version": "2.0", "element-path": "elements", - "plugins": [ - {"origin": "local", "path": "plugins", "elements": {"warninga": 0, "warningb": 0, "corewarn": 0,}} - ], + "plugins": [{"origin": "local", "path": "plugins", "elements": ["warninga", "warningb", "corewarn"]}], "fatal-warnings": fatal_warnings, } diff --git a/tests/frontend/configuredwarning/project.conf b/tests/frontend/configuredwarning/project.conf index 195ee176a..9d75ad18b 100644 --- a/tests/frontend/configuredwarning/project.conf +++ b/tests/frontend/configuredwarning/project.conf @@ -5,5 +5,5 @@ plugins: - origin: local path: element_plugins elements: - warninga: 0 - warningb: 0 + - warninga + - warningb diff --git a/tests/frontend/consistencyerror/project.conf b/tests/frontend/consistencyerror/project.conf index d28ba12df..f5c1b39c5 100644 --- a/tests/frontend/consistencyerror/project.conf +++ b/tests/frontend/consistencyerror/project.conf @@ -9,5 +9,5 @@ plugins: - origin: local path: plugins sources: - consistencyerror: 0 - consistencybug: 0 + - consistencyerror + - consistencybug diff --git a/tests/frontend/mirror.py b/tests/frontend/mirror.py index 848047ee8..bffc754e7 100644 --- a/tests/frontend/mirror.py +++ b/tests/frontend/mirror.py @@ -49,7 +49,7 @@ def generate_project(): {"name": "arrakis", "aliases": {"foo": ["OFO/"], "bar": ["RBA/"],},}, {"name": "oz", "aliases": {"foo": ["ooF/"], "bar": ["raB/"],}}, ], - "plugins": [{"origin": "local", "path": "sources", "sources": {"fetch_source": 0}}], + "plugins": [{"origin": "local", "path": "sources", "sources": ["fetch_source"]}], } return project diff --git a/tests/frontend/push.py b/tests/frontend/push.py index 362084372..970885784 100644 --- a/tests/frontend/push.py +++ b/tests/frontend/push.py @@ -641,7 +641,7 @@ def test_push_after_rebuild(cli, tmpdir, datafiles): config={ "element-path": "elements", "min-version": "2.0", - "plugins": [{"origin": "local", "path": "plugins", "elements": {"randomelement": 0}}], + "plugins": [{"origin": "local", "path": "plugins", "elements": ["randomelement"]}], }, ) |