summaryrefslogtreecommitdiff
path: root/src/buildstream/plugins
diff options
context:
space:
mode:
Diffstat (limited to 'src/buildstream/plugins')
-rw-r--r--src/buildstream/plugins/elements/filter.py9
-rw-r--r--src/buildstream/plugins/elements/filter.yaml5
2 files changed, 13 insertions, 1 deletions
diff --git a/src/buildstream/plugins/elements/filter.py b/src/buildstream/plugins/elements/filter.py
index c2c2e0125..795d8910b 100644
--- a/src/buildstream/plugins/elements/filter.py
+++ b/src/buildstream/plugins/elements/filter.py
@@ -168,7 +168,7 @@ class FilterElement(Element):
def configure(self, node):
node.validate_keys([
- 'include', 'exclude', 'include-orphans'
+ 'include', 'exclude', 'include-orphans', 'pass-integration'
])
self.include_node = node.get_sequence('include')
@@ -177,6 +177,7 @@ class FilterElement(Element):
self.include = self.include_node.as_str_list()
self.exclude = self.exclude_node.as_str_list()
self.include_orphans = node.get_bool('include-orphans')
+ self.pass_integration = node.get_bool('pass-integration', False)
def preflight(self):
# Exactly one build-depend is permitted
@@ -252,6 +253,12 @@ class FilterElement(Element):
output_elm = build_deps[0]._get_source_element()
return output_elm
+ def integrate(self, sandbox):
+ if self.pass_integration:
+ for dep in self.dependencies(Scope.BUILD, recurse=False):
+ dep.integrate(sandbox)
+ super().integrate(sandbox)
+
def setup():
return FilterElement
diff --git a/src/buildstream/plugins/elements/filter.yaml b/src/buildstream/plugins/elements/filter.yaml
index 9c2bf69f4..12a82a9cb 100644
--- a/src/buildstream/plugins/elements/filter.yaml
+++ b/src/buildstream/plugins/elements/filter.yaml
@@ -27,3 +27,8 @@ config:
# the parent element.
#
include-orphans: False
+
+ # Whether to pass the 'integration-commands' of the
+ # parent element through the filter.
+ #
+ pass-integration: False