fix(esp_libc): limit timespec_get test to picolibc

The regression test was compiled by Newlib configurations even though that
libc does not expose TIME_UTC or timespec_get in the selected toolchain.

- Guard the test with CONFIG_LIBC_PICOLIBC
- Label the case as a Picolibc-specific regression

Generated with [Codex](https://github.com/openai)
This commit is contained in:
idy
2026-08-28 08:12:23 +02:00
committed by Guillaume Souchere
parent cb5c414fe8
commit ed92ba1e24
@@ -548,7 +548,8 @@ TEST_CASE("test posix_timers clock_... functions", "[newlib]")
test_posix_timers_clock();
}
TEST_CASE("timespec_get returns UTC time", "[newlib]")
#if CONFIG_LIBC_PICOLIBC
TEST_CASE("timespec_get returns UTC time", "[picolibc]")
{
struct timespec ts = {0};
@@ -558,6 +559,7 @@ TEST_CASE("timespec_get returns UTC time", "[newlib]")
TEST_ASSERT_LESS_THAN_INT32(1000000000L, ts.tv_nsec);
TEST_ASSERT_EQUAL_INT(0, timespec_get(&ts, -1));
}
#endif
#define TEST_USE_CPU_CYCLES 1
#if TEST_USE_CPU_CYCLES && CONFIG_ESP_SYSTEM_SINGLE_CORE_MODE