From c83c8df26a9e99fc21c2fa596b97db5fe2cb2bd6 Mon Sep 17 00:00:00 2001 From: Alberto Escolar Piedras Date: Mon, 23 Oct 2023 12:31:10 +0200 Subject: [PATCH] tests/lib/time: Fix for posix architecture * Select always PICOLIBC. This is anyhow the default for all but the posix architecture. And for the posix architecture we need it as POSIX_CLOCK does not work with the host C library. * Fix the testcase filtering. This sample works fine in native_sim (when not using the host libC), but does not work for native_posix(_64), as those can only be built with the host libC, and in that case, the POSIX_CLOCK provided functions will not be properly linked to. Signed-off-by: Alberto Escolar Piedras --- tests/lib/time/prj.conf | 1 + tests/lib/time/testcase.yaml | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/tests/lib/time/prj.conf b/tests/lib/time/prj.conf index 786d6bc705e..aac2e48e364 100644 --- a/tests/lib/time/prj.conf +++ b/tests/lib/time/prj.conf @@ -1,2 +1,3 @@ CONFIG_ZTEST=y CONFIG_POSIX_CLOCK=y +CONFIG_PICOLIBC=y diff --git a/tests/lib/time/testcase.yaml b/tests/lib/time/testcase.yaml index d70430fe987..f4e8d91ec1b 100644 --- a/tests/lib/time/testcase.yaml +++ b/tests/lib/time/testcase.yaml @@ -1,7 +1,9 @@ tests: libraries.libc.time: tags: libc - filter: not CONFIG_ARCH_POSIX or CONFIG_NATIVE_POSIX_SLOWDOWN_TO_REAL_TIME timeout: 180 integration_platforms: - mps2_an385 + platform_exclude: + - native_posix + - native_posix_64