zephyr/tests/lib
Dominik Ermel 4c8ed7dd9a devicetree.h: Rework DT_ANY_INST_HAS_PROP_STATUS_OKAY
The macro is searching for all instances of specific device
that contain specific property and evaluates to true (1) if
any device does.
The macro used to do that by generating, using
DT_ANY_INST_HAS_PROP_STATUS_OKAY, a logical expression
like (0 || 1 || 0), where each digit represented existence of
property (1) or lack of it (0).
Unfortunately other util macros, like IS_ENABLED, were
not able to evaluate such expression, as they often simply
expect something they can evaluate to 0 or 1.

The commit here changes DT_ANY_INST_HAS_PROP_STATUS_OKAY
to generate a list of tokens (1) where token is added to list
only for instance of a device that has the property;
then such list is processed using IS_EMPTY() macro and
in the end 0 or 1 is generated, depending on whether
any enabled instance of a device has the property or not.
This change allows result of DT_ANY_INST_HAS_PROP_STATUS_OKAY
to be used with macros like IS_ENABLED, IF_ENABLED or
COND_CODE_x.

Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
2024-03-20 16:52:48 +00:00
..
acpi lib: acpi: update shell and test app with the modifed resource struct 2024-02-15 12:28:55 +01:00
c_lib tests/lib: Use hwmv2 native targets identifiers 2024-03-15 16:13:12 +01:00
cbprintf_fp tests: cbprintf: fix test meta data and components 2023-10-11 14:19:40 +03:00
cbprintf_package tests: lib: cbprintf_package: Add test case for cbprintf_convert 2023-12-28 12:18:50 +00:00
cmsis_dsp hwmv2: Introduce Hardware model version 2 and convert devices 2024-03-02 16:56:33 -05:00
cmsis_nn hwmv2: Introduce Hardware model version 2 and convert devices 2024-03-02 16:56:33 -05:00
cpp tests: Replace nRF54H20 PDK with nRF54H20 DK 2024-03-18 19:11:36 +00:00
devicetree devicetree.h: Rework DT_ANY_INST_HAS_PROP_STATUS_OKAY 2024-03-20 16:52:48 +00:00
fdtable tests: fix thread function signatures 2023-10-30 12:24:34 +01:00
gui/lvgl tests/lib: Use hwmv2 native targets identifiers 2024-03-15 16:13:12 +01:00
hash_function tests/lib/*: Switch integration platform to native_sim 2023-11-30 09:42:25 -05:00
hash_map tests/lib: Use hwmv2 native targets identifiers 2024-03-15 16:13:12 +01:00
heap hwmv2: Introduce Hardware model version 2 and convert devices 2024-03-02 16:56:33 -05:00
heap_align hwmv2: Introduce Hardware model version 2 and convert devices 2024-03-02 16:56:33 -05:00
json tests/lib/*: Switch integration platform to native_sim 2023-11-30 09:42:25 -05:00
linear_range tests/lib/*: Switch integration platform to native_sim 2023-11-30 09:42:25 -05:00
mem_alloc tests: remove CONFIG_ZTEST_NEW_API in all tests 2023-10-20 15:04:29 +02:00
mem_blocks tests/lib/*: Switch integration platform to native_sim 2023-11-30 09:42:25 -05:00
mem_blocks_stats tests/lib/*: Switch integration platform to native_sim 2023-11-30 09:42:25 -05:00
mpsc_pbuf hwmv2: Introduce Hardware model version 2 and convert devices 2024-03-02 16:56:33 -05:00
multi_heap hwmv2: Introduce Hardware model version 2 and convert devices 2024-03-02 16:56:33 -05:00
newlib hwmv2: Introduce Hardware model version 2 and convert devices 2024-03-02 16:56:33 -05:00
notify tests/lib/*: Switch integration platform to native_sim 2023-11-30 09:42:25 -05:00
onoff tests/lib/*: Switch integration platform to native_sim 2023-11-30 09:42:25 -05:00
p4workq tests/lib/*: Switch integration platform to native_sim 2023-11-30 09:42:25 -05:00
ringbuffer tests/lib: Use hwmv2 native targets identifiers 2024-03-15 16:13:12 +01:00
shared_multi_heap hwmv2: Introduce Hardware model version 2 and convert devices 2024-03-02 16:56:33 -05:00
smf Lib: SMF: Add initial transition and smf_set_handled() 2024-03-04 22:16:40 +01:00
sprintf tests: sprintf: Avoid buffer overrun 2024-03-15 17:08:58 -04:00
spsc_pbuf tests/lib/*: Switch integration platform to native_sim 2023-11-30 09:42:25 -05:00
sys_util tests/lib/*: Switch integration platform to native_sim 2023-11-30 09:42:25 -05:00
time tests/lib: Use hwmv2 native targets identifiers 2024-03-15 16:13:12 +01:00