1# SPDX-License-Identifier: Apache-2.0 2 3zephyr_syscall_header( 4 ${ZEPHYR_BASE}/subsys/testsuite/ztest/include/zephyr/ztest_error_hook.h 5 ${ZEPHYR_BASE}/subsys/testsuite/ztest/include/zephyr/ztest_test.h 6) 7 8zephyr_include_directories( 9 ${ZEPHYR_BASE}/subsys/testsuite/include 10 ${ZEPHYR_BASE}/subsys/testsuite/ztest/include 11 ) 12 13if(DEFINED TC_RUNID) 14 zephyr_compile_definitions(TC_RUNID=${TC_RUNID}) 15endif() 16 17zephyr_library() 18zephyr_library_sources( 19 src/ztest.c 20 src/ztest_error_hook.c 21 src/ztest_rules.c 22 ) 23zephyr_library_sources_ifdef(CONFIG_ZTEST_MOCKING src/ztest_mock.c) 24zephyr_library_sources_ifdef(CONFIG_ZTRESS src/ztress.c) 25 26 27if(CONFIG_ARCH_POSIX) 28 zephyr_library_sources(src/ztest_posix.c) 29elseif(CONFIG_ZTEST_SHELL) 30 zephyr_library_sources(src/ztest_shell.c) 31else() 32 zephyr_library_sources(src/ztest_defaults.c) 33endif() 34