diff options
Diffstat (limited to 'tests/format/dependencies3')
-rw-r--r-- | tests/format/dependencies3/all-all.bst | 11 | ||||
-rw-r--r-- | tests/format/dependencies3/build-all.bst | 11 | ||||
-rw-r--r-- | tests/format/dependencies3/build-build.bst | 11 | ||||
-rw-r--r-- | tests/format/dependencies3/build-runtime.bst | 11 | ||||
-rw-r--r-- | tests/format/dependencies3/dep.bst | 4 | ||||
-rw-r--r-- | tests/format/dependencies3/elements/dep.bst | 2 | ||||
-rw-r--r-- | tests/format/dependencies3/elements/runtime-error.bst | 6 | ||||
-rw-r--r-- | tests/format/dependencies3/elements/supported1.bst | 6 | ||||
-rw-r--r-- | tests/format/dependencies3/elements/supported2.bst | 9 | ||||
-rw-r--r-- | tests/format/dependencies3/elements/unsupported.bst | 6 | ||||
-rw-r--r-- | tests/format/dependencies3/plugins/configsupported.py | 29 | ||||
-rw-r--r-- | tests/format/dependencies3/plugins/configunsupported.py | 19 | ||||
-rw-r--r-- | tests/format/dependencies3/project.conf | 11 | ||||
-rw-r--r-- | tests/format/dependencies3/runtime-all.bst | 11 | ||||
-rw-r--r-- | tests/format/dependencies3/runtime-runtime.bst | 11 |
15 files changed, 87 insertions, 71 deletions
diff --git a/tests/format/dependencies3/all-all.bst b/tests/format/dependencies3/all-all.bst deleted file mode 100644 index 98122472d..000000000 --- a/tests/format/dependencies3/all-all.bst +++ /dev/null @@ -1,11 +0,0 @@ -kind: import - -sources: -- kind: local - path: all-all.bst - -depends: -- filename: dep.bst - type: all -- filename: dep.bst - type: all diff --git a/tests/format/dependencies3/build-all.bst b/tests/format/dependencies3/build-all.bst deleted file mode 100644 index 4c66524e7..000000000 --- a/tests/format/dependencies3/build-all.bst +++ /dev/null @@ -1,11 +0,0 @@ -kind: import - -sources: -- kind: local - path: all-all.bst - -depends: -- filename: dep.bst - type: build -- filename: dep.bst - type: all diff --git a/tests/format/dependencies3/build-build.bst b/tests/format/dependencies3/build-build.bst deleted file mode 100644 index 2a813b3ab..000000000 --- a/tests/format/dependencies3/build-build.bst +++ /dev/null @@ -1,11 +0,0 @@ -kind: import - -sources: -- kind: local - path: all-all.bst - -depends: -- filename: dep.bst - type: build -- filename: dep.bst - type: build diff --git a/tests/format/dependencies3/build-runtime.bst b/tests/format/dependencies3/build-runtime.bst deleted file mode 100644 index f740736d8..000000000 --- a/tests/format/dependencies3/build-runtime.bst +++ /dev/null @@ -1,11 +0,0 @@ -kind: import - -sources: -- kind: local - path: all-all.bst - -depends: -- filename: dep.bst - type: build -- filename: dep.bst - type: runtime diff --git a/tests/format/dependencies3/dep.bst b/tests/format/dependencies3/dep.bst deleted file mode 100644 index f4f9f6862..000000000 --- a/tests/format/dependencies3/dep.bst +++ /dev/null @@ -1,4 +0,0 @@ -kind: import -sources: -- kind: local - path: project.conf diff --git a/tests/format/dependencies3/elements/dep.bst b/tests/format/dependencies3/elements/dep.bst new file mode 100644 index 000000000..9e5cf96b6 --- /dev/null +++ b/tests/format/dependencies3/elements/dep.bst @@ -0,0 +1,2 @@ +kind: manual +description: Some kinda element diff --git a/tests/format/dependencies3/elements/runtime-error.bst b/tests/format/dependencies3/elements/runtime-error.bst new file mode 100644 index 000000000..948997aa9 --- /dev/null +++ b/tests/format/dependencies3/elements/runtime-error.bst @@ -0,0 +1,6 @@ +kind: configsupported + +runtime-depends: +- filename: dep.bst + config: + enabled: true diff --git a/tests/format/dependencies3/elements/supported1.bst b/tests/format/dependencies3/elements/supported1.bst new file mode 100644 index 000000000..528475ab0 --- /dev/null +++ b/tests/format/dependencies3/elements/supported1.bst @@ -0,0 +1,6 @@ +kind: configsupported + +depends: +- filename: dep.bst + config: + enabled: true diff --git a/tests/format/dependencies3/elements/supported2.bst b/tests/format/dependencies3/elements/supported2.bst new file mode 100644 index 000000000..041ef08c1 --- /dev/null +++ b/tests/format/dependencies3/elements/supported2.bst @@ -0,0 +1,9 @@ +kind: configsupported + +depends: +- filename: dep.bst + config: + enabled: true +- filename: dep.bst + config: + enabled: true diff --git a/tests/format/dependencies3/elements/unsupported.bst b/tests/format/dependencies3/elements/unsupported.bst new file mode 100644 index 000000000..eca090018 --- /dev/null +++ b/tests/format/dependencies3/elements/unsupported.bst @@ -0,0 +1,6 @@ +kind: configunsupported + +depends: +- filename: dep.bst + config: + enabled: true diff --git a/tests/format/dependencies3/plugins/configsupported.py b/tests/format/dependencies3/plugins/configsupported.py new file mode 100644 index 000000000..06f85f7a3 --- /dev/null +++ b/tests/format/dependencies3/plugins/configsupported.py @@ -0,0 +1,29 @@ +from buildstream import Element + + +class ConfigSupported(Element): + BST_MIN_VERSION = "2.0" + + def configure(self, node): + pass + + def configure_dependencies(self, dependencies): + self.configs = [] + + for dep in dependencies: + if dep.config: + dep.config.validate_keys(["enabled"]) + self.configs.append(dep) + + self.info("TEST PLUGIN FOUND {} ENABLED DEPENDENCIES".format(len(self.configs))) + + def preflight(self): + pass + + def get_unique_key(self): + return {} + + +# Plugin entry point +def setup(): + return ConfigSupported diff --git a/tests/format/dependencies3/plugins/configunsupported.py b/tests/format/dependencies3/plugins/configunsupported.py new file mode 100644 index 000000000..9dcaca1ee --- /dev/null +++ b/tests/format/dependencies3/plugins/configunsupported.py @@ -0,0 +1,19 @@ +from buildstream import Element + + +class ConfigUnsupported(Element): + BST_MIN_VERSION = "2.0" + + def configure(self, node): + pass + + def preflight(self): + pass + + def get_unique_key(self): + return {} + + +# Plugin entry point +def setup(): + return ConfigUnsupported diff --git a/tests/format/dependencies3/project.conf b/tests/format/dependencies3/project.conf index 8b361b03d..c1b99eb12 100644 --- a/tests/format/dependencies3/project.conf +++ b/tests/format/dependencies3/project.conf @@ -1,2 +1,11 @@ -name: dup-dup-checker +# Basic project +name: test min-version: 2.0 +element-path: elements + +plugins: +- origin: local + path: plugins + elements: + - configsupported + - configunsupported diff --git a/tests/format/dependencies3/runtime-all.bst b/tests/format/dependencies3/runtime-all.bst deleted file mode 100644 index c08594623..000000000 --- a/tests/format/dependencies3/runtime-all.bst +++ /dev/null @@ -1,11 +0,0 @@ -kind: import - -sources: -- kind: local - path: all-all.bst - -depends: -- filename: dep.bst - type: runtime -- filename: dep.bst - type: all diff --git a/tests/format/dependencies3/runtime-runtime.bst b/tests/format/dependencies3/runtime-runtime.bst deleted file mode 100644 index d01181f9b..000000000 --- a/tests/format/dependencies3/runtime-runtime.bst +++ /dev/null @@ -1,11 +0,0 @@ -kind: import - -sources: -- kind: local - path: all-all.bst - -depends: -- filename: dep.bst - type: runtime -- filename: dep.bst - type: runtime |