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 <alberto.escolar.piedras@nordicsemi.no>
This commit is contained in:
Alberto Escolar Piedras 2023-10-23 12:31:10 +02:00 committed by Carles Cufí
commit c83c8df26a
2 changed files with 4 additions and 1 deletions

View file

@ -1,2 +1,3 @@
CONFIG_ZTEST=y
CONFIG_POSIX_CLOCK=y
CONFIG_PICOLIBC=y

View file

@ -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