modules: fff: Fix issue with tests being skipped in CI
The filter in the testcase.yaml made it impossible for these to run. Also, the Kconfig names for the options didn't really make much sense so they were renamed to avoid conflict. This fixes an issue found by #36433. Signed-off-by: Yuval Peress <peress@google.com>
This commit is contained in:
parent
d214bc5340
commit
347a297da2
1
.github/workflows/twister.yaml
vendored
1
.github/workflows/twister.yaml
vendored
|
@ -65,6 +65,7 @@ jobs:
|
|||
rm -fr ".git/rebase-apply"
|
||||
git rebase origin/${BASE_REF}
|
||||
git log --pretty=oneline | head -n 10
|
||||
west config manifest.group-filter -- +ci
|
||||
west init -l . || true
|
||||
# no need for west update here
|
||||
|
||||
|
|
|
@ -5,17 +5,17 @@
|
|||
|
||||
if(CONFIG_FFF_TEST)
|
||||
# Add the FFF C test suites as ztest suites
|
||||
message("CONFIG_FFF_TEST_C=${CONFIG_FFF_TEST_C}")
|
||||
message("CONFIG_FFF_TEST_GLOBAL_C=${CONFIG_FFF_TEST_GLOBAL_C}")
|
||||
message("CONFIG_FFF_TEST_TYPE_C=${CONFIG_FFF_TEST_TYPE_C}")
|
||||
message("CONFIG_FFF_TEST_TYPE_GLOBAL_C=${CONFIG_FFF_TEST_TYPE_GLOBAL_C}")
|
||||
zephyr_library()
|
||||
zephyr_include_directories(
|
||||
include
|
||||
"${ZEPHYR_CURRENT_MODULE_DIR}"
|
||||
"${ZEPHYR_CURRENT_MODULE_DIR}/test"
|
||||
)
|
||||
if(DEFINED CONFIG_FFF_TEST_C)
|
||||
if(DEFINED CONFIG_FFF_TEST_TYPE_C)
|
||||
zephyr_library_sources("${ZEPHYR_CURRENT_MODULE_DIR}/test/fff_test_c.c")
|
||||
elseif(DEFINED CONFIG_FFF_TEST_GLOBAL_C)
|
||||
elseif(DEFINED CONFIG_FFF_TEST_TYPE_GLOBAL_C)
|
||||
zephyr_library_sources(
|
||||
"${ZEPHYR_CURRENT_MODULE_DIR}/test/fff_test_global_c.c"
|
||||
"${ZEPHYR_CURRENT_MODULE_DIR}/test/global_fakes.c"
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
config ZEPHYR_FFF_MODULE
|
||||
bool
|
||||
|
||||
config FFF_TEST
|
||||
menuconfig FFF_TEST
|
||||
bool "FFF Test suite"
|
||||
help
|
||||
Enable the FFF test suite. This should really only be called from the tests for FFF under
|
||||
|
@ -12,15 +12,15 @@ config FFF_TEST
|
|||
|
||||
if FFF_TEST
|
||||
|
||||
choice FFF_TEST
|
||||
choice FFF_TEST_TYPE
|
||||
prompt "The type of FFF test to bring in"
|
||||
|
||||
config FFF_TEST_C
|
||||
config FFF_TEST_TYPE_C
|
||||
bool "Compile the FFF default C test suite as a zephyr library"
|
||||
|
||||
config FFF_TEST_GLOBAL_C
|
||||
config FFF_TEST_TYPE_GLOBAL_C
|
||||
bool "Compile the FFF global C test suite as a zephyr library"
|
||||
|
||||
endchoice # FFF_TEST
|
||||
endchoice # FFF_TEST_TYPE
|
||||
|
||||
endif # FFF_TEST
|
||||
|
|
|
@ -2,8 +2,11 @@
|
|||
# SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
cmake_minimum_required(VERSION 3.20.0)
|
||||
|
||||
# Add the Zephyr package and create the project
|
||||
find_package(Zephyr REQUIRED HINTS $ENV{ZEPHYR_BASE})
|
||||
project(mock_fff)
|
||||
|
||||
# Glob the sources and add them to the app
|
||||
FILE(GLOB app_sources src/*.c)
|
||||
target_sources(app PRIVATE ${app_sources})
|
||||
|
|
|
@ -1,3 +1,3 @@
|
|||
CONFIG_ZTEST=y
|
||||
CONFIG_FFF_TEST=y
|
||||
CONFIG_FFF_TEST_C=y
|
||||
CONFIG_FFF_TEST_TYPE_C=y
|
||||
|
|
|
@ -1,3 +1,3 @@
|
|||
CONFIG_ZTEST=y
|
||||
CONFIG_FFF_TEST=y
|
||||
CONFIG_FFF_TEST_GLOBAL_C=y
|
||||
CONFIG_FFF_TEST_TYPE_GLOBAL_C=y
|
||||
|
|
Loading…
Reference in a new issue