tests: misc: kconfigoptions: test new options

Test new kconfig options.

Signed-off-by: Jordan Yates <jordan.yates@data61.csiro.au>
This commit is contained in:
Jordan Yates 2023-07-30 13:44:28 +10:00 committed by Carles Cufí
parent 999afdc728
commit a18761e298
2 changed files with 27 additions and 0 deletions

View file

@ -13,6 +13,21 @@ config FLASH_CONTROLLER_SIZE
int
default $(dt_node_array_prop_int,$(DT_FLASH_CONTROLLER),reg,1)
config FLASH_CONTROLLER_ADDR_INT_NODELABEL
int
default $(dt_nodelabel_reg_addr_int,flashcontroller0)
config FLASH_CONTROLLER_ADDR_HEX_NODELABEL
hex
default $(dt_nodelabel_reg_addr_hex,flashcontroller0)
config FLASH_CONTROLLER_SIZE_INT_NODELABEL
int
default $(dt_nodelabel_reg_size_int,flashcontroller0)
config FLASH_CONTROLLER_SIZE_HEX_NODELABEL
hex
default $(dt_nodelabel_reg_size_hex,flashcontroller0)
menu "Zephyr Kernel"
source "Kconfig.zephyr"

View file

@ -22,4 +22,16 @@ ZTEST(kconfigoptions, test_kconfigoptions_array_int)
"Unexpected flash controller size (%d)", CONFIG_FLASH_CONTROLLER_SIZE);
}
ZTEST(kconfigoptions, test_kconfigoptions_addr_nodelabel)
{
zassert_equal(1, CONFIG_FLASH_CONTROLLER_ADDR_INT_NODELABEL, "Unexpected value");
zassert_equal(1, CONFIG_FLASH_CONTROLLER_ADDR_HEX_NODELABEL, "Unexpected value");
}
ZTEST(kconfigoptions, test_kconfigoptions_size_nodelabel)
{
zassert_equal(4194304, CONFIG_FLASH_CONTROLLER_SIZE_INT_NODELABEL, "Unexpected value");
zassert_equal(4194304, CONFIG_FLASH_CONTROLLER_SIZE_HEX_NODELABEL, "Unexpected value");
}
ZTEST_SUITE(kconfigoptions, NULL, NULL, NULL, NULL, NULL);