Add a series of unit tests which try to cover somewhat systematically the possible inputs and what we finally get at the exit of the Binding constructor. Running the assumption that any (valid) YAML binding file is something we can make a Binding instance with: - check which properties are defined at which level (binding, child-binding, grandchild-binding, etc) and their specifications once the binding is initialized - check how including bindings are permitted to specialize the specifications of inherited properties - check the rules applied when overwriting a binding's description or compatible string (at the binding, child-binding, etc, levels) Some tests covering known issues are disabled by default: - this permits to document these issues - while not causing CI errors (when running the python-devicetree unit tests) - enabling these tests without causing errors should allow us to consider the related issues are fixed Signed-off-by: Christophe Dufaza <chris@openmarl.org>
21 lines
445 B
YAML
21 lines
445 B
YAML
# SPDX-License-Identifier: BSD-3-Clause
|
|
#
|
|
# Top level binding file (device binding) for testing
|
|
# descriptions and compatible strings.
|
|
|
|
description: The Thing device.
|
|
|
|
compatible: "vnd,thing"
|
|
|
|
include:
|
|
- name: base_amend.yaml
|
|
- name: thing.yaml
|
|
|
|
child-binding:
|
|
compatible: "vnd,thing-child"
|
|
description: The Thing's child-binding.
|
|
|
|
child-binding:
|
|
compatible: "vnd,thing-grandchild"
|
|
description: The Thing's grandchild-binding.
|