Commit graph zephyr/tests/kconfig
Author SHA1 Message Date
Mateusz Junkier
754f972b4d tests: kconfig: fix path for different repo names
Test expected path "zephyr/boards/Kconfig" but failed when the
repository had a different name.
Changed to "boards/Kconfig" to work with any repository name,
as code below.

Signed-off-by: Mateusz Junkier <mateusz.junkier@intel.com>
2025-12-15 17:11:18 +00:00
Luca Burelli
6200c672c7 tests/kconfig: add Kconfig origin tracing test
Add a test case that verifies Kconfig value origin traces are correctly
generated in both JSON and pickle formats. The test includes a sample
Kconfig configuration with dependencies, selections, and choices to
cover various scenarios. A validation script checks the generated source
origin data against expected values.

In addition, the 'traceconfig' target is called to test the generation
of the Markdown file with the Kconfig trace report.

Signed-off-by: Luca Burelli <l.burelli@arduino.cc>
2025-10-22 18:34:49 +03:00
Henrik Brix Andersen
993baae940 tests: kconfig: functions: add tests for dt_compat_enabled
Add tests for the dt_compat_enabled Kconfig function.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2025-08-08 10:47:29 -05:00
Henrik Brix Andersen
5ca8be264d tests: kconfig: functions: add tests for dt_compat_enabled_num
Add tests for the dt_compat_enabled_num Kconfig helper function.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2025-06-27 10:07:01 -05:00
Grzegorz Swiderski
64bb8b6796 scripts: kconfig: Add hex variants of arithmetic functions
Functions like `add` and `sub` can only return base 10 integers, which
means they can't really be used to define Kconfig symbols of type `hex`.

For the same reason, there already exist pairs of devicetree functions
named e.g., `dt_node_reg_addr_(int|hex)` after different return types.

Introduce `add_hex`, `sub_hex`, and friends.

To avoid confusion, it should be possible for those new functions to
accept arguments in base 16 as well. It's actually easier to let all
arithmetic functions take their inputs in "any" base, by leveraging
Python's built-in: `int(..., base=0)`.

Signed-off-by: Grzegorz Swiderski <grzegorz.swiderski@nordicsemi.no>
2025-06-17 16:09:41 +02:00
Pieter De Gendt
555a56f262 tests: kconfig: functions: Add min/max functions
Add test case for kconfig min/max functions.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2024-08-02 13:41:07 +02:00
Pieter De Gendt
1e6f39e91b tests: kconfig: functions: Fix arithmetic typo
Moved the test to a single main file, fixed a typo
arithmetric -> arithmetic

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2024-08-02 13:41:07 +02:00
TOKITA Hiroshi
e31588fcca tests: kconfig: Add tests for Kconfig arithmetrics
Add tests about kconfig function for arithmetric.

Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@gmail.com>
2024-07-31 12:56:25 +02:00
Carles Cufi
03a7dfbaa8 tests: Remove stray uses of CONFIG_ZTEST_NEW_API
Commit 345735d0a8 removed all uses of the
now obsolete CONFIG_ZTEST_NEW_API Kconfig option. A couple of stray ones
are still remaining in the tree, remove them.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2023-10-26 10:55:38 +02:00
Jordan Yates
cea39d4383 tests: kconfig: test configdefault extension
Test the behaviour of the `configdefault` kconfig extension.

Signed-off-by: Jordan Yates <jordan.yates@data61.csiro.au>
2023-10-26 09:47:06 +02:00