summaryrefslogtreecommitdiff
path: root/tests/plugins/pipeline
diff options
context:
space:
mode:
Diffstat (limited to 'tests/plugins/pipeline')
-rw-r--r--tests/plugins/pipeline/badversionelement/customelements/__init__.py0
-rw-r--r--tests/plugins/pipeline/badversionelement/customelements/foo.py19
-rw-r--r--tests/plugins/pipeline/badversionelement/elements/simple.bst4
-rw-r--r--tests/plugins/pipeline/badversionelement/project.conf12
-rw-r--r--tests/plugins/pipeline/badversionsource/customsources/__init__.py0
-rw-r--r--tests/plugins/pipeline/badversionsource/customsources/foo.py19
-rw-r--r--tests/plugins/pipeline/badversionsource/elements/simple.bst6
-rw-r--r--tests/plugins/pipeline/badversionsource/project.conf12
-rw-r--r--tests/plugins/pipeline/customelement/elements/simple.bst4
-rw-r--r--tests/plugins/pipeline/customelement/pluginelements/__init__.py0
-rw-r--r--tests/plugins/pipeline/customelement/pluginelements/foo.py17
-rw-r--r--tests/plugins/pipeline/customelement/project.conf5
-rw-r--r--tests/plugins/pipeline/customsource/elements/simple.bst6
-rw-r--r--tests/plugins/pipeline/customsource/pluginsources/__init__.py0
-rw-r--r--tests/plugins/pipeline/customsource/pluginsources/foo.py17
-rw-r--r--tests/plugins/pipeline/customsource/project.conf5
16 files changed, 126 insertions, 0 deletions
diff --git a/tests/plugins/pipeline/badversionelement/customelements/__init__.py b/tests/plugins/pipeline/badversionelement/customelements/__init__.py
new file mode 100644
index 000000000..e69de29bb
--- /dev/null
+++ b/tests/plugins/pipeline/badversionelement/customelements/__init__.py
diff --git a/tests/plugins/pipeline/badversionelement/customelements/foo.py b/tests/plugins/pipeline/badversionelement/customelements/foo.py
new file mode 100644
index 000000000..75536e87f
--- /dev/null
+++ b/tests/plugins/pipeline/badversionelement/customelements/foo.py
@@ -0,0 +1,19 @@
+from buildstream import Element
+
+
+class FooElement(Element):
+
+ BST_FORMAT_VERSION = 5
+
+ def preflight(self):
+ pass
+
+ def configure(self, node):
+ pass
+
+ def get_unique_key(self):
+ return {}
+
+
+def setup():
+ return FooElement
diff --git a/tests/plugins/pipeline/badversionelement/elements/simple.bst b/tests/plugins/pipeline/badversionelement/elements/simple.bst
new file mode 100644
index 000000000..f949dc5b5
--- /dev/null
+++ b/tests/plugins/pipeline/badversionelement/elements/simple.bst
@@ -0,0 +1,4 @@
+kind: foo
+description: Custom foo element
+config:
+ some: thing
diff --git a/tests/plugins/pipeline/badversionelement/project.conf b/tests/plugins/pipeline/badversionelement/project.conf
new file mode 100644
index 000000000..66d0f5549
--- /dev/null
+++ b/tests/plugins/pipeline/badversionelement/project.conf
@@ -0,0 +1,12 @@
+name: pony
+element-path: elements
+
+required-versions:
+
+ # We provided bar at version 5, should be a conflict.
+ sources:
+ foo: 10
+
+plugins:
+ sources:
+ - customelements
diff --git a/tests/plugins/pipeline/badversionsource/customsources/__init__.py b/tests/plugins/pipeline/badversionsource/customsources/__init__.py
new file mode 100644
index 000000000..e69de29bb
--- /dev/null
+++ b/tests/plugins/pipeline/badversionsource/customsources/__init__.py
diff --git a/tests/plugins/pipeline/badversionsource/customsources/foo.py b/tests/plugins/pipeline/badversionsource/customsources/foo.py
new file mode 100644
index 000000000..f50855fd1
--- /dev/null
+++ b/tests/plugins/pipeline/badversionsource/customsources/foo.py
@@ -0,0 +1,19 @@
+from buildstream import Source, Consistency
+
+
+class BarSource(Source):
+
+ BST_FORMAT_VERSION = 5
+
+ def preflight(self):
+ pass
+
+ def configure(self, node):
+ pass
+
+ def get_consistency(self):
+ return Consistency.INCONSISTENT
+
+
+def setup():
+ return BarSource
diff --git a/tests/plugins/pipeline/badversionsource/elements/simple.bst b/tests/plugins/pipeline/badversionsource/elements/simple.bst
new file mode 100644
index 000000000..7e0cc43b7
--- /dev/null
+++ b/tests/plugins/pipeline/badversionsource/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/badversionsource/project.conf b/tests/plugins/pipeline/badversionsource/project.conf
new file mode 100644
index 000000000..2925989d1
--- /dev/null
+++ b/tests/plugins/pipeline/badversionsource/project.conf
@@ -0,0 +1,12 @@
+name: pony
+element-path: elements
+
+required-versions:
+
+ # We provided bar at version 5, should be a conflict.
+ sources:
+ foo: 10
+
+plugins:
+ sources:
+ - customsources
diff --git a/tests/plugins/pipeline/customelement/elements/simple.bst b/tests/plugins/pipeline/customelement/elements/simple.bst
new file mode 100644
index 000000000..fc48e3ba9
--- /dev/null
+++ b/tests/plugins/pipeline/customelement/elements/simple.bst
@@ -0,0 +1,4 @@
+kind: foo
+description: Custom foo source
+config:
+ pony-color: pink
diff --git a/tests/plugins/pipeline/customelement/pluginelements/__init__.py b/tests/plugins/pipeline/customelement/pluginelements/__init__.py
new file mode 100644
index 000000000..e69de29bb
--- /dev/null
+++ b/tests/plugins/pipeline/customelement/pluginelements/__init__.py
diff --git a/tests/plugins/pipeline/customelement/pluginelements/foo.py b/tests/plugins/pipeline/customelement/pluginelements/foo.py
new file mode 100644
index 000000000..823306ebc
--- /dev/null
+++ b/tests/plugins/pipeline/customelement/pluginelements/foo.py
@@ -0,0 +1,17 @@
+from buildstream import Element
+
+
+class FooElement(Element):
+
+ def preflight(self):
+ pass
+
+ def configure(self, node):
+ pass
+
+ def get_unique_key(self):
+ return {}
+
+
+def setup():
+ return FooElement
diff --git a/tests/plugins/pipeline/customelement/project.conf b/tests/plugins/pipeline/customelement/project.conf
new file mode 100644
index 000000000..fa80eea01
--- /dev/null
+++ b/tests/plugins/pipeline/customelement/project.conf
@@ -0,0 +1,5 @@
+name: pony
+element-path: elements
+plugins:
+ elements:
+ - pluginelements
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