tests: lib: move time testsuite to c_lib

Presumably the time testsuite was separate from the c library set of
testsuites because it had a depedency on POSIX.

Since that dependency no longer exists, colocate the time testsuite
with the other c library testsuites.

Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
This commit is contained in:
Chris Friedt 2025-05-17 21:42:58 -04:00 committed by Benjamin Cabé
parent 9ecb7965b6
commit 3e30e2eddd
6 changed files with 5 additions and 10 deletions

View File

@ -2587,7 +2587,6 @@ Utilities:
- tests/unit/list/
- tests/unit/intmath/
- tests/unit/pot/
- tests/lib/time/
- tests/lib/onoff/
- tests/lib/sys_util/
- tests/lib/sprintf/

View File

@ -0,0 +1,2 @@
CONFIG_ZTEST=y
CONFIG_PICOLIBC=y

View File

@ -37,7 +37,7 @@ ZTEST(libc_time, test_time_passing)
time_current = time(NULL);
zassert_equal(time_current, time_initial + i,
"Current time (%d) does not match expected time (%d)",
(int) time_current, (int) (time_initial + i));
(int)time_current, (int)(time_initial + i));
}
}
@ -49,14 +49,12 @@ ZTEST(libc_time, test_time_param)
time_result = time(&time_param);
zassert_equal(time_result, time_param,
"time() result does not match param value");
zassert_equal(time_result, time_param, "time() result does not match param value");
for (i = 0; i < 10; i++) {
k_sleep(K_SECONDS(1));
zassert_equal(time_result, time_param,
"time() result does not match param value");
zassert_equal(time_result, time_param, "time() result does not match param value");
}
}

View File

@ -1,4 +0,0 @@
CONFIG_ZTEST=y
CONFIG_POSIX_TIMERS=y
CONFIG_XSI_SINGLE_PROCESS=y
CONFIG_PICOLIBC=y