Skip to content

Commit

Permalink
ztests: Build POSIX arch extra functionality only if possible
Browse files Browse the repository at this point in the history
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 <alberto.escolar.piedras@nordicsemi.no>
  • Loading branch information
aescolar authored and carlescufi committed Jun 23, 2023
1 parent f60e4db commit b4b2eaa
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion subsys/testsuite/ztest/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit b4b2eaa

Please sign in to comment.