Commit 308b5682 authored by Christophe Dufaza's avatar Christophe Dufaza Committed by Mahesh Mahadevan
Browse files

Revert "edtlib: test filters set by including bindings"



This unit test was added specifically to cover a regression
reported by the CI while working on [1].

Further work on related issues [2] showed that:
- [1] and [2] are dead end: we need to first rethink
  how bindings (and especially child-bindings) are initialized
- the inclusion mechanism supported by Zephyr deserves more systematic
  testing in edtlib if we want to work with confidence

The approach we choose is to:
- revert all changes made in [1]
- from there, systematically add unit tests as we address
  the issues we identified (or the additional features we need)
  one after the other

[1] edtlib: fix last modified semantic in included property specs
[2] edtlib: Preserve paths of properties from included child bindings

See also: #65221, #78095

This reverts commit 33bb3b60.

Signed-off-by: default avatarChristophe Dufaza <chris@openmarl.org>
parent ec10d56f
Loading
Loading
Loading
Loading
+0 −3
Original line number Diff line number Diff line
# SPDX-License-Identifier: BSD-3-Clause

include: base.yaml
+0 −10
Original line number Diff line number Diff line
# SPDX-License-Identifier: BSD-3-Clause

description: Test property-allowlist filters set by including bindings

compatible: "top-allowlist"

include:
  - name: inc-base.yaml
    property-allowlist:
      - x
+0 −10
Original line number Diff line number Diff line
# SPDX-License-Identifier: BSD-3-Clause

description: Test property-blocklist filters set by including bindings.

compatible: "top-blocklist"

include:
  - name: inc-base.yaml
    property-blocklist:
      - x
+0 −17
Original line number Diff line number Diff line
@@ -378,23 +378,6 @@ def test_include_paths():
        assert 'base.yaml' == os.path.basename(top.prop2specs["y"].path)
        assert 'top.yaml' == os.path.basename(top.prop2specs["p"].path)

def test_include_filters_included_bindings():
    '''Test filters set by including bindings.'''
    fname2path = {'base.yaml': 'test-bindings-include/base.yaml',
                  'inc-base.yaml': 'test-bindings-include/inc-base.yaml'}

    with from_here():
        top_allows = edtlib.Binding('test-bindings-include/top-allows.yaml', fname2path)
    assert top_allows.prop2specs.get("x")
    assert not top_allows.prop2specs.get("y")

    with from_here():
        top_blocks = edtlib.Binding('test-bindings-include/top-blocks.yaml', fname2path)
    assert not top_blocks.prop2specs.get("x")
    assert top_blocks.prop2specs.get("y")



def test_bus():
    '''Test 'bus:' and 'on-bus:' in bindings'''
    with from_here():