This is an automated email from the ASF dual-hosted git repository.

tvb pushed a commit to branch valentindavid/flatpak-demo
in repository https://gitbox.apache.org/repos/asf/buildstream.git

commit f06c2ce4c6c6a66e1e5ddcf3acc8d6cc218a0a38
Author: Valentin David <[email protected]>
AuthorDate: Wed Jun 27 17:10:39 2018 +0200

    buildstream/_includes.py: Remove validation of fragments.
---
 buildstream/_includes.py |  6 +-----
 buildstream/_project.py  |  2 +-
 tests/format/include.py  | 11 -----------
 3 files changed, 2 insertions(+), 17 deletions(-)

diff --git a/buildstream/_includes.py b/buildstream/_includes.py
index eed73a0..3837c5d 100644
--- a/buildstream/_includes.py
+++ b/buildstream/_includes.py
@@ -5,9 +5,8 @@ from . import _yaml
 
 class Includes:
 
-    def __init__(self, loader, valid_keys=None):
+    def __init__(self, loader):
         self._loader = loader
-        self._valid_keys = valid_keys
         self._loaded = {}
 
     def process(self, node):
@@ -21,9 +20,6 @@ class Includes:
 
             for include in includes:
                 include_node = self._include_file(include)
-                if self._valid_keys:
-                    _yaml.node_validate(include_node, self._valid_keys)
-
                 _yaml.composite(node, include_node)
 
         for _, value in _yaml.node_items(node):
diff --git a/buildstream/_project.py b/buildstream/_project.py
index 67eba0f..e50b26a 100644
--- a/buildstream/_project.py
+++ b/buildstream/_project.py
@@ -405,7 +405,7 @@ class Project():
 
         self._load_pass(_yaml.node_copy(config), self.first_pass_config, True)
 
-        project_includes = Includes(self.loader, self.INCLUDE_CONFIG_KEYS + 
['elements', 'sources'])
+        project_includes = Includes(self.loader)
         project_includes.process(config)
 
         self._load_pass(config, self.config, False)
diff --git a/tests/format/include.py b/tests/format/include.py
index ca6eaab..b09830a 100644
--- a/tests/format/include.py
+++ b/tests/format/include.py
@@ -60,17 +60,6 @@ def test_include_junction_options(cli, tmpdir, datafiles):
 
 
 @pytest.mark.datafiles(DATA_DIR)
-def test_include_project_defines_name(cli, datafiles):
-    project = os.path.join(str(datafiles), 'defines_name')
-    result = cli.run(project=project, args=[
-        'show',
-        '--deps', 'none',
-        '--format', '%{vars}',
-        'element.bst'])
-    result.assert_main_error(ErrorDomain.LOAD, LoadErrorReason.INVALID_DATA)
-
-
[email protected](DATA_DIR)
 def test_junction_element_partial_project_project(cli, tmpdir, datafiles):
     """
     Junction elements never depend on fully include processed project.

Reply via email to