forked from zephyrproject-rtos/zephyr
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
edtlib: tests: cover basics of filtering inherited properties
Use-case "B includes I includes X": - X is a base binding file, specifying common properties - I is an intermediary binding file, which includes X without modification nor filter - B includes I, filtering the properties it chooses to inherit with an allowlist or a blocklist Check that the properties inherited from X via I are actually filtered as B intends to, up to the grandchild-binding level. Signed-off-by: Christophe Dufaza <[email protected]>
- Loading branch information
1 parent
2d17437
commit 0a8ba9e
Showing
5 changed files
with
171 additions
and
0 deletions.
There are no files selected for viewing
30 changes: 30 additions & 0 deletions
30
scripts/dts/python-devicetree/tests/test-bindings-include/simple.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
# SPDX-License-Identifier: BSD-3-Clause | ||
# | ||
# Base properties for testing property filters up to | ||
# the grandchild-binding level. | ||
|
||
properties: | ||
prop-1: | ||
type: int | ||
prop-2: | ||
type: int | ||
prop-3: | ||
type: int | ||
|
||
child-binding: | ||
properties: | ||
child-prop-1: | ||
type: int | ||
child-prop-2: | ||
type: int | ||
child-prop-3: | ||
type: int | ||
|
||
child-binding: | ||
properties: | ||
grandchild-prop-1: | ||
type: int | ||
grandchild-prop-2: | ||
type: int | ||
grandchild-prop-3: | ||
type: int |
12 changes: 12 additions & 0 deletions
12
scripts/dts/python-devicetree/tests/test-bindings-include/simple_filter_allowlist.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
# SPDX-License-Identifier: BSD-3-Clause | ||
# | ||
# Filter inherited property specifications | ||
# up to the grandchild-binding level. | ||
|
||
include: | ||
- name: simple_inherit.yaml | ||
property-allowlist: [prop-1] | ||
child-binding: | ||
property-allowlist: [child-prop-1] | ||
child-binding: | ||
property-allowlist: [grandchild-prop-1] |
12 changes: 12 additions & 0 deletions
12
scripts/dts/python-devicetree/tests/test-bindings-include/simple_filter_blocklist.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
# SPDX-License-Identifier: BSD-3-Clause | ||
# | ||
# Filter inherited property specifications | ||
# up to the grandchild-binding level. | ||
|
||
include: | ||
- name: simple_inherit.yaml | ||
property-blocklist: [prop-2, prop-3] | ||
child-binding: | ||
property-blocklist: [child-prop-2, child-prop-3] | ||
child-binding: | ||
property-blocklist: [grandchild-prop-2, grandchild-prop-3] |
5 changes: 5 additions & 0 deletions
5
scripts/dts/python-devicetree/tests/test-bindings-include/simple_inherit.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
# SPDX-License-Identifier: BSD-3-Clause | ||
# | ||
# Inherits property specifications without modification. | ||
|
||
include: simple.yaml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters