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:
parent
9ecb7965b6
commit
3e30e2eddd
@ -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/
|
||||
|
||||
2
tests/lib/c_lib/time/prj.conf
Normal file
2
tests/lib/c_lib/time/prj.conf
Normal file
@ -0,0 +1,2 @@
|
||||
CONFIG_ZTEST=y
|
||||
CONFIG_PICOLIBC=y
|
||||
@ -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");
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,4 +0,0 @@
|
||||
CONFIG_ZTEST=y
|
||||
CONFIG_POSIX_TIMERS=y
|
||||
CONFIG_XSI_SINGLE_PROCESS=y
|
||||
CONFIG_PICOLIBC=y
|
||||
Loading…
Reference in New Issue
Block a user