summaryrefslogtreecommitdiff
path: root/tests/format/dependencies3/plugins/configsupported.py
blob: 06f85f7a300fae62a8b465c54a45c0385dea9a20 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
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