diff options
author | Tristan Van Berkom <tristan.vanberkom@codethink.co.uk> | 2017-08-30 22:17:16 -0400 |
---|---|---|
committer | Tristan Van Berkom <tristan.vanberkom@codethink.co.uk> | 2017-08-30 22:59:17 -0400 |
commit | 4005ff5f7a2aedc0d39425278fb337b4aa6a85d6 (patch) | |
tree | fad116f392a3a17bc576c1b18c56dd390ecf96ed /tests/plugins/pipeline/customsource | |
parent | 347983ca1641bd9fa121863008d290992a70d210 (diff) | |
download | buildstream-format-version.tar.gz |
plugin tests: Adding new tests with plugins loaded in a pipelineformat-version
o Testing that we can load a custom element or source
o Testing that we assert and trigger an error when the requested
format version of a plugin by the project is greater than the
reported version of the plugin
Diffstat (limited to 'tests/plugins/pipeline/customsource')
4 files changed, 28 insertions, 0 deletions
diff --git a/tests/plugins/pipeline/customsource/elements/simple.bst b/tests/plugins/pipeline/customsource/elements/simple.bst new file mode 100644 index 000000000..7e0cc43b7 --- /dev/null +++ b/tests/plugins/pipeline/customsource/elements/simple.bst @@ -0,0 +1,6 @@ +kind: autotools +description: Custom foo source +sources: +- kind: foo + ref: 1.2.3 + uri: http://ponyland.com diff --git a/tests/plugins/pipeline/customsource/pluginsources/__init__.py b/tests/plugins/pipeline/customsource/pluginsources/__init__.py new file mode 100644 index 000000000..e69de29bb --- /dev/null +++ b/tests/plugins/pipeline/customsource/pluginsources/__init__.py diff --git a/tests/plugins/pipeline/customsource/pluginsources/foo.py b/tests/plugins/pipeline/customsource/pluginsources/foo.py new file mode 100644 index 000000000..d2b0d9c6d --- /dev/null +++ b/tests/plugins/pipeline/customsource/pluginsources/foo.py @@ -0,0 +1,17 @@ +from buildstream import Source, Consistency + + +class FooSource(Source): + + def preflight(self): + pass + + def configure(self, node): + pass + + def get_consistency(self): + return Consistency.INCONSISTENT + + +def setup(): + return FooSource diff --git a/tests/plugins/pipeline/customsource/project.conf b/tests/plugins/pipeline/customsource/project.conf new file mode 100644 index 000000000..0be4f201b --- /dev/null +++ b/tests/plugins/pipeline/customsource/project.conf @@ -0,0 +1,5 @@ +name: pony +element-path: elements +plugins: + sources: + - pluginsources |