summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/internals/pluginloading.py38
-rw-r--r--tests/internals/pluginloading/customelement/elements/simple.bst4
-rw-r--r--tests/internals/pluginloading/customelement/pluginelements/__init__.py0
-rw-r--r--tests/internals/pluginloading/customelement/pluginelements/foo.py19
-rw-r--r--tests/internals/pluginloading/customelement/project.conf8
-rw-r--r--tests/internals/pluginloading/customsource/elements/simple.bst6
-rw-r--r--tests/internals/pluginloading/customsource/pluginsources/__init__.py0
-rw-r--r--tests/internals/pluginloading/customsource/pluginsources/foo.py19
-rw-r--r--tests/internals/pluginloading/customsource/project.conf8
9 files changed, 0 insertions, 102 deletions
diff --git a/tests/internals/pluginloading.py b/tests/internals/pluginloading.py
deleted file mode 100644
index 1f4446541..000000000
--- a/tests/internals/pluginloading.py
+++ /dev/null
@@ -1,38 +0,0 @@
-from contextlib import contextmanager
-import os
-import pytest
-
-from buildstream._project import Project
-from buildstream._pipeline import Pipeline
-
-from tests.testutils import dummy_context
-
-DATA_DIR = os.path.join(os.path.dirname(os.path.realpath(__file__)), "pluginloading",)
-
-
-@contextmanager
-def create_pipeline(tmpdir, basedir, target):
- with dummy_context() as context:
- context.deploydir = os.path.join(str(tmpdir), "deploy")
- context.casdir = os.path.join(str(tmpdir), "cas")
- project = Project(basedir, context)
-
- pipeline = Pipeline(context, project, None)
- (targets,) = pipeline.load([(target,)])
- yield targets
-
-
-@pytest.mark.datafiles(os.path.join(DATA_DIR, "customsource"))
-def test_customsource(datafiles, tmpdir):
-
- basedir = str(datafiles)
- with create_pipeline(tmpdir, basedir, "simple.bst") as targets:
- assert targets[0].get_kind() == "autotools"
-
-
-@pytest.mark.datafiles(os.path.join(DATA_DIR, "customelement"))
-def test_customelement(datafiles, tmpdir):
-
- basedir = str(datafiles)
- with create_pipeline(tmpdir, basedir, "simple.bst") as targets:
- assert targets[0].get_kind() == "foo"
diff --git a/tests/internals/pluginloading/customelement/elements/simple.bst b/tests/internals/pluginloading/customelement/elements/simple.bst
deleted file mode 100644
index fc48e3ba9..000000000
--- a/tests/internals/pluginloading/customelement/elements/simple.bst
+++ /dev/null
@@ -1,4 +0,0 @@
-kind: foo
-description: Custom foo source
-config:
- pony-color: pink
diff --git a/tests/internals/pluginloading/customelement/pluginelements/__init__.py b/tests/internals/pluginloading/customelement/pluginelements/__init__.py
deleted file mode 100644
index e69de29bb..000000000
--- a/tests/internals/pluginloading/customelement/pluginelements/__init__.py
+++ /dev/null
diff --git a/tests/internals/pluginloading/customelement/pluginelements/foo.py b/tests/internals/pluginloading/customelement/pluginelements/foo.py
deleted file mode 100644
index bdb6c8982..000000000
--- a/tests/internals/pluginloading/customelement/pluginelements/foo.py
+++ /dev/null
@@ -1,19 +0,0 @@
-from buildstream import Element
-
-
-class FooElement(Element):
-
- BST_MIN_VERSION = "2.0"
-
- def preflight(self):
- pass
-
- def configure(self, node):
- pass
-
- def get_unique_key(self):
- return {}
-
-
-def setup():
- return FooElement
diff --git a/tests/internals/pluginloading/customelement/project.conf b/tests/internals/pluginloading/customelement/project.conf
deleted file mode 100644
index 2619bdf82..000000000
--- a/tests/internals/pluginloading/customelement/project.conf
+++ /dev/null
@@ -1,8 +0,0 @@
-name: pony
-min-version: 2.0
-element-path: elements
-plugins:
-- origin: local
- path: pluginelements
- elements:
- - foo
diff --git a/tests/internals/pluginloading/customsource/elements/simple.bst b/tests/internals/pluginloading/customsource/elements/simple.bst
deleted file mode 100644
index 7e0cc43b7..000000000
--- a/tests/internals/pluginloading/customsource/elements/simple.bst
+++ /dev/null
@@ -1,6 +0,0 @@
-kind: autotools
-description: Custom foo source
-sources:
-- kind: foo
- ref: 1.2.3
- uri: http://ponyland.com
diff --git a/tests/internals/pluginloading/customsource/pluginsources/__init__.py b/tests/internals/pluginloading/customsource/pluginsources/__init__.py
deleted file mode 100644
index e69de29bb..000000000
--- a/tests/internals/pluginloading/customsource/pluginsources/__init__.py
+++ /dev/null
diff --git a/tests/internals/pluginloading/customsource/pluginsources/foo.py b/tests/internals/pluginloading/customsource/pluginsources/foo.py
deleted file mode 100644
index c5229f3e2..000000000
--- a/tests/internals/pluginloading/customsource/pluginsources/foo.py
+++ /dev/null
@@ -1,19 +0,0 @@
-from buildstream import Source
-
-
-class FooSource(Source):
-
- BST_MIN_VERSION = "2.0"
-
- def preflight(self):
- pass
-
- def configure(self, node):
- pass
-
- def get_unique_key(self):
- pass
-
-
-def setup():
- return FooSource
diff --git a/tests/internals/pluginloading/customsource/project.conf b/tests/internals/pluginloading/customsource/project.conf
deleted file mode 100644
index 5cb6da537..000000000
--- a/tests/internals/pluginloading/customsource/project.conf
+++ /dev/null
@@ -1,8 +0,0 @@
-name: pony
-min-version: 2.0
-element-path: elements
-plugins:
-- origin: local
- path: pluginsources
- sources:
- - foo