mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-06-25 21:20:35 +08:00
WIP: device tree MVP
This commit is contained in:
@@ -0,0 +1 @@
|
||||
This directory contains bindings used to test the 'include:' feature.
|
||||
+11
@@ -0,0 +1,11 @@
|
||||
# SPDX-License-Identifier: BSD-3-Clause
|
||||
|
||||
description: |
|
||||
An include must not give both an allowlist and a blocklist in a
|
||||
child binding. This binding should cause an error.
|
||||
compatible: allow-and-blocklist-child
|
||||
include:
|
||||
- name: include.yaml
|
||||
child-binding:
|
||||
property-blocklist: [x]
|
||||
property-allowlist: [y]
|
||||
@@ -0,0 +1,10 @@
|
||||
# SPDX-License-Identifier: BSD-3-Clause
|
||||
|
||||
description: |
|
||||
An include must not give both an allowlist and a blocklist.
|
||||
This binding should cause an error.
|
||||
compatible: allow-and-blocklist
|
||||
include:
|
||||
- name: include.yaml
|
||||
property-blocklist: [x]
|
||||
property-allowlist: [y]
|
||||
@@ -0,0 +1,10 @@
|
||||
# SPDX-License-Identifier: BSD-3-Clause
|
||||
|
||||
description: |
|
||||
A property-allowlist, if given, must be a list. This binding should
|
||||
cause an error.
|
||||
compatible: allow-not-list
|
||||
include:
|
||||
- name: include.yaml
|
||||
property-allowlist:
|
||||
foo:
|
||||
@@ -0,0 +1,7 @@
|
||||
# SPDX-License-Identifier: BSD-3-Clause
|
||||
|
||||
description: Valid property-allowlist.
|
||||
compatible: allowlist
|
||||
include:
|
||||
- name: include.yaml
|
||||
property-allowlist: [x]
|
||||
@@ -0,0 +1,10 @@
|
||||
# SPDX-License-Identifier: BSD-3-Clause
|
||||
|
||||
description: |
|
||||
A property-blocklist, if given, must be a list. This binding should
|
||||
cause an error.
|
||||
compatible: block-not-list
|
||||
include:
|
||||
- name: include.yaml
|
||||
property-blocklist:
|
||||
foo:
|
||||
@@ -0,0 +1,7 @@
|
||||
# SPDX-License-Identifier: BSD-3-Clause
|
||||
|
||||
description: Valid property-blocklist.
|
||||
compatible: blocklist
|
||||
include:
|
||||
- name: include.yaml
|
||||
property-blocklist: [x]
|
||||
@@ -0,0 +1,7 @@
|
||||
# SPDX-License-Identifier: BSD-3-Clause
|
||||
|
||||
description: An empty property-allowlist is valid.
|
||||
compatible: empty-allowlist
|
||||
include:
|
||||
- name: include.yaml
|
||||
property-allowlist: []
|
||||
@@ -0,0 +1,7 @@
|
||||
# SPDX-License-Identifier: BSD-3-Clause
|
||||
|
||||
description: An empty property-blocklist is valid.
|
||||
compatible: empty-blocklist
|
||||
include:
|
||||
- name: include.yaml
|
||||
property-blocklist: []
|
||||
@@ -0,0 +1,11 @@
|
||||
description: Test binding for filtering 'child-binding' properties
|
||||
|
||||
include:
|
||||
- name: include.yaml
|
||||
property-allowlist: [x]
|
||||
child-binding:
|
||||
property-blocklist: [child-prop-1]
|
||||
child-binding:
|
||||
property-allowlist: [grandchild-prop-1]
|
||||
|
||||
compatible: filter-child-bindings
|
||||
@@ -0,0 +1,7 @@
|
||||
# SPDX-License-Identifier: BSD-3-Clause
|
||||
|
||||
description: Second file for testing "intermixed" includes.
|
||||
compatible: include-2
|
||||
properties:
|
||||
a:
|
||||
type: int
|
||||
@@ -0,0 +1,10 @@
|
||||
# SPDX-License-Identifier: BSD-3-Clause
|
||||
|
||||
description: |
|
||||
Invalid include element: invalid keys are present.
|
||||
compatible: include-invalid-keys
|
||||
include:
|
||||
- name: include.yaml
|
||||
property-allowlist: [x]
|
||||
bad-key-1: 3
|
||||
bad-key-2: 3
|
||||
@@ -0,0 +1,5 @@
|
||||
description: |
|
||||
Invalid include: wrong top level type.
|
||||
compatible: include-invalid-type
|
||||
include:
|
||||
a-map-is-not-allowed-here: 3
|
||||
@@ -0,0 +1,6 @@
|
||||
# SPDX-License-Identifier: BSD-3-Clause
|
||||
|
||||
description: A map element with just a name is valid, and has no filters.
|
||||
compatible: include-no-list
|
||||
include:
|
||||
- name: include.yaml
|
||||
@@ -0,0 +1,7 @@
|
||||
# SPDX-License-Identifier: BSD-3-Clause
|
||||
|
||||
description: |
|
||||
Invalid include element: no name key is present.
|
||||
compatible: include-no-name
|
||||
include:
|
||||
- property-allowlist: [x]
|
||||
@@ -0,0 +1,24 @@
|
||||
# SPDX-License-Identifier: BSD-3-Clause
|
||||
|
||||
description: Test file for including other bindings
|
||||
compatible: include
|
||||
properties:
|
||||
x:
|
||||
type: int
|
||||
y:
|
||||
type: int
|
||||
z:
|
||||
type: int
|
||||
child-binding:
|
||||
properties:
|
||||
child-prop-1:
|
||||
type: int
|
||||
child-prop-2:
|
||||
type: int
|
||||
|
||||
child-binding:
|
||||
properties:
|
||||
grandchild-prop-1:
|
||||
type: int
|
||||
grandchild-prop-2:
|
||||
type: int
|
||||
@@ -0,0 +1,8 @@
|
||||
# SPDX-License-Identifier: BSD-3-Clause
|
||||
|
||||
description: Including intermixed file names and maps is valid.
|
||||
compatible: intermixed
|
||||
include:
|
||||
- name: include.yaml
|
||||
property-allowlist: [x]
|
||||
- include-2.yaml
|
||||
Reference in New Issue
Block a user