Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sanitycheck dts awarness #20204

Merged
merged 3 commits into from
Nov 4, 2019
Merged

Conversation

galak
Copy link
Collaborator

@galak galak commented Oct 29, 2019

Replace use of DT_ Kconfig defines with functions that query the dts/edt.

@galak galak requested a review from ulfalizer October 29, 2019 06:20
@zephyrbot zephyrbot added area: Samples Samples area: Tests Issues related to a particular existing or missing test area: Sanitycheck Sanitycheck has been renamed to Twister labels Oct 29, 2019
@zephyrbot
Copy link
Collaborator

zephyrbot commented Oct 29, 2019

All checks are passing now.

Tip: The bot edits this comment instead of posting a new one, so you can check the comment's history to see earlier messages.

Copy link
Collaborator

@ulfalizer ulfalizer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some nits. Nice to get rid of more .conf stuff.

Is there any documentation that needs to be updated btw?

samples/basic/threads/sample.yaml Outdated Show resolved Hide resolved
scripts/sanitycheck Outdated Show resolved Hide resolved
scripts/sanity_chk/expr_parser.py Outdated Show resolved Hide resolved
scripts/sanitycheck Outdated Show resolved Hide resolved
scripts/sanity_chk/expr_parser.py Outdated Show resolved Hide resolved
scripts/sanity_chk/expr_parser.py Outdated Show resolved Hide resolved
scripts/sanitycheck Outdated Show resolved Hide resolved
scripts/sanitycheck Outdated Show resolved Hide resolved
scripts/sanitycheck Outdated Show resolved Hide resolved
Add the following functions to allow filtering based on device tree

dt_compat_enabled(compat) - Returns true if a device tree node
compatible matches 'compat' and the node is enabled.

dt_alias_exists(alias) - Returns true if a device tree node exists with
'alias' and the node is enabled.

dt_compat_enabled_with_alias - Returns true if a device tree node
compatible matches 'compat' and the node has 'alias' and the node is
enabled.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
convert sample and test yaml filters that utilize a DT_ define to
instead use a dt_ function.  The intent is to remove the Kconfig
generated DT defines and just make directy queries into the device tree.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
All users of dt kconfig symbols for tests and samples are using dt
functions instead so we can remove the support for parsing the
generated file.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
Copy link
Collaborator

@ulfalizer ulfalizer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fine with me.

@erwango
Copy link
Member

erwango commented Oct 29, 2019

I think these macros (dt_compat_enabled("jedec,spi-nor")) could also be usefull in CMakeLists.txt.
Anyway these could be shared or provided from CMake?

EDIT: Would solve #9406

@nashif nashif self-assigned this Nov 4, 2019
@nashif nashif merged commit 9b5720d into zephyrproject-rtos:master Nov 4, 2019
@stephanosio
Copy link
Member

This seems to have broken something:
#20119 (comment)

aescolar added a commit to aescolar/zephyr that referenced this pull request Nov 6, 2019
PR zephyrproject-rtos#20204 broke master for boards without DTS
PR zephyrproject-rtos#20365 tried to partially fix it, but the filtering in
sanitycheck remained broken
Let's quickly revert it to allow other PRs to come in,
and then resubmit them in a separate PR.

This reverts commit 556f3cb.

Signed-off-by: Alberto Escolar Piedras <alpi@oticon.com>
aescolar added a commit to aescolar/zephyr that referenced this pull request Nov 6, 2019
PR zephyrproject-rtos#20204 broke master for boards without DTS
PR zephyrproject-rtos#20365 tried to partially fix it, but the filtering in
sanitycheck remained broken
Let's quickly revert it to allow other PRs to come in,
and then resubmit them in a separate PR.

This reverts commit 4cc91fd.

Signed-off-by: Alberto Escolar Piedras <alpi@oticon.com>
aescolar added a commit to aescolar/zephyr that referenced this pull request Nov 6, 2019
PR zephyrproject-rtos#20204 broke master for boards without DTS
PR zephyrproject-rtos#20365 tried to partially fix it, but the filtering in
sanitycheck remained broken
Let's quickly revert it to allow other PRs to come in,
and then resubmit them in a separate PR.

This reverts commit 9b5720d.

Signed-off-by: Alberto Escolar Piedras <alpi@oticon.com>
aescolar added a commit to aescolar/zephyr that referenced this pull request Nov 6, 2019
PR zephyrproject-rtos#20204 broke master for boards without DTS
PR zephyrproject-rtos#20365 tried to partially fix it, but the filtering in
sanitycheck remained broken
Let's quickly revert it to allow other PRs to come in,
and then resubmit them in a separate PR.

This reverts commit 7733b94.

Signed-off-by: Alberto Escolar Piedras <alpi@oticon.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: Samples Samples area: Sanitycheck Sanitycheck has been renamed to Twister area: Tests Issues related to a particular existing or missing test
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants