mirror of
https://github.com/espressif/esp-idf.git
synced 2026-10-01 18:50:34 +03:00
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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user