From b4b2eaae35b2f35b7553b4d5d85cac4192a486b7 Mon Sep 17 00:00:00 2001 From: Alberto Escolar Piedras Date: Wed, 31 May 2023 16:10:30 +0200 Subject: [PATCH] ztests: Build POSIX arch extra functionality only if possible The extra ztest functionality for the posix arch requires the host libC. Disable it if we are building with an embedded libC. Signed-off-by: Alberto Escolar Piedras --- subsys/testsuite/ztest/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/subsys/testsuite/ztest/CMakeLists.txt b/subsys/testsuite/ztest/CMakeLists.txt index c9c9332898581f..a0cf1615159980 100644 --- a/subsys/testsuite/ztest/CMakeLists.txt +++ b/subsys/testsuite/ztest/CMakeLists.txt @@ -24,7 +24,7 @@ zephyr_library_sources_ifdef(CONFIG_ZTEST_MOCKING src/ztest_mock.c) zephyr_library_sources_ifdef(CONFIG_ZTRESS src/ztress.c) -if(CONFIG_ARCH_POSIX) +if(CONFIG_ARCH_POSIX AND CONFIG_EXTERNAL_LIBC) 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)