Skip to content

Commit

Permalink
Revert "edtlib: test filters set by including bindings"
Browse files Browse the repository at this point in the history
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: zephyrproject-rtos#65221, zephyrproject-rtos#78095

This reverts commit 33bb3b6.

Signed-off-by: Christophe Dufaza <[email protected]>
  • Loading branch information
dottspina authored and JA-NXP committed Nov 19, 2024
1 parent f9e3a43 commit 6c399c1
Show file tree
Hide file tree
Showing 4 changed files with 0 additions and 40 deletions.

This file was deleted.

This file was deleted.

This file was deleted.

17 changes: 0 additions & 17 deletions scripts/dts/python-devicetree/tests/test_edtlib.py
Original file line number Diff line number Diff line change
Expand Up @@ -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():
Expand Down

0 comments on commit 6c399c1

Please sign in to comment.