2019-04-06 09:08:09 -04:00
|
|
|
# SPDX-License-Identifier: Apache-2.0
|
|
|
|
|
2017-10-27 15:43:34 +02:00
|
|
|
zephyr_include_directories(
|
2020-02-12 15:42:09 +01:00
|
|
|
${ZEPHYR_BASE}/subsys/testsuite/include
|
|
|
|
${ZEPHYR_BASE}/subsys/testsuite/ztest/include
|
2017-10-27 15:43:34 +02:00
|
|
|
)
|
2022-04-19 11:54:42 -06:00
|
|
|
zephyr_include_directories_ifdef(
|
|
|
|
CONFIG_LEGACY_INCLUDE_PATH ${ZEPHYR_BASE}/subsys/testsuite/include/zephyr)
|
|
|
|
zephyr_include_directories_ifdef(
|
|
|
|
CONFIG_LEGACY_INCLUDE_PATH ${ZEPHYR_BASE}/subsys/testsuite/ztest/include/zephyr)
|
2017-10-27 15:43:34 +02:00
|
|
|
|
2022-04-07 16:08:34 -04:00
|
|
|
if(DEFINED TC_RUNID)
|
|
|
|
zephyr_compile_definitions(TC_RUNID=${TC_RUNID})
|
|
|
|
endif()
|
|
|
|
|
2017-10-27 15:43:34 +02:00
|
|
|
zephyr_library()
|
2021-10-20 14:01:43 -06:00
|
|
|
zephyr_library_sources_ifndef(CONFIG_ZTEST_NEW_API src/ztest.c)
|
|
|
|
zephyr_library_sources_ifdef(CONFIG_ZTEST_NEW_API src/ztest_new.c)
|
|
|
|
zephyr_library_sources( src/ztest_error_hook.c)
|
|
|
|
zephyr_library_sources_ifdef(CONFIG_ZTEST_NEW_API src/ztest_rules.c)
|
|
|
|
zephyr_library_sources_ifdef(CONFIG_ZTEST_MOCKING src/ztest_mock.c)
|
|
|
|
zephyr_library_sources_ifdef(CONFIG_ZTRESS src/ztress.c)
|
2022-03-30 13:38:00 -06:00
|
|
|
|
|
|
|
|
|
|
|
if(CONFIG_ARCH_POSIX)
|
|
|
|
zephyr_library_sources_ifdef(CONFIG_ZTEST_NEW_API src/ztest_posix.c)
|
|
|
|
else()
|
|
|
|
zephyr_library_sources_ifdef(CONFIG_ZTEST_NEW_API src/ztest_defaults.c)
|
|
|
|
endif()
|