2021-09-22 12:30:09 +08:00
|
|
|
# Copyright (c) 2021 Google LLC
|
|
|
|
#
|
|
|
|
# SPDX-License-Identifier: Apache-2.0
|
|
|
|
|
|
|
|
|
|
|
|
if(CONFIG_FFF_TEST)
|
|
|
|
# Add the FFF C test suites as ztest suites
|
2022-03-17 02:06:41 +08:00
|
|
|
message("CONFIG_FFF_TEST_TYPE_C=${CONFIG_FFF_TEST_TYPE_C}")
|
|
|
|
message("CONFIG_FFF_TEST_TYPE_GLOBAL_C=${CONFIG_FFF_TEST_TYPE_GLOBAL_C}")
|
2021-09-22 12:30:09 +08:00
|
|
|
zephyr_library()
|
|
|
|
zephyr_include_directories(
|
|
|
|
include
|
|
|
|
"${ZEPHYR_CURRENT_MODULE_DIR}"
|
|
|
|
"${ZEPHYR_CURRENT_MODULE_DIR}/test"
|
|
|
|
)
|
2022-03-17 02:06:41 +08:00
|
|
|
if(DEFINED CONFIG_FFF_TEST_TYPE_C)
|
2021-09-22 12:30:09 +08:00
|
|
|
zephyr_library_sources("${ZEPHYR_CURRENT_MODULE_DIR}/test/fff_test_c.c")
|
2022-03-17 02:06:41 +08:00
|
|
|
elseif(DEFINED CONFIG_FFF_TEST_TYPE_GLOBAL_C)
|
2021-09-22 12:30:09 +08:00
|
|
|
zephyr_library_sources(
|
|
|
|
"${ZEPHYR_CURRENT_MODULE_DIR}/test/fff_test_global_c.c"
|
|
|
|
"${ZEPHYR_CURRENT_MODULE_DIR}/test/global_fakes.c"
|
|
|
|
)
|
|
|
|
endif()
|
|
|
|
endif()
|