tests: crypto: move the rand32 test to new ztest API

Migrate the testsuite tests/crypto/rand32 to the new
ztest API.

Signed-off-by: Enjia Mai <enjia.mai@intel.com>
This commit is contained in:
Enjia Mai 2022-08-22 10:01:36 +08:00 committed by Anas Nashif
commit 7a39635f0d
5 changed files with 6 additions and 8 deletions

View file

@ -1,4 +1,5 @@
CONFIG_ZTEST=y
CONFIG_ZTEST_NEW_API=y
CONFIG_LOG=y
CONFIG_ENTROPY_GENERATOR=y
CONFIG_TEST_RANDOM_GENERATOR=y

View file

@ -1,3 +1,4 @@
CONFIG_ZTEST=y
CONFIG_ZTEST_NEW_API=y
CONFIG_LOG=y
CONFIG_ENTROPY_GENERATOR=y

View file

@ -1,4 +1,5 @@
CONFIG_ZTEST=y
CONFIG_ZTEST_NEW_API=y
CONFIG_LOG=y
CONFIG_ENTROPY_GENERATOR=y
CONFIG_XOSHIRO_RANDOM_GENERATOR=y

View file

@ -1,4 +1,5 @@
CONFIG_ZTEST=y
CONFIG_ZTEST_NEW_API=y
CONFIG_LOG=y
CONFIG_ENTROPY_GENERATOR=y
CONFIG_TEST_RANDOM_GENERATOR=y

View file

@ -26,7 +26,7 @@
*
*/
void test_rand32(void)
ZTEST(rand32_common, test_rand32)
{
uint32_t gen, last_gen, tmp;
int rnd_cnt;
@ -112,10 +112,4 @@ void test_rand32(void)
#endif /* CONFIG_CSPRING_ENABLED */
}
void test_main(void)
{
ztest_test_suite(common_test, ztest_unit_test(test_rand32));
ztest_run_test_suite(common_test);
}
ZTEST_SUITE(rand32_common, NULL, NULL, NULL, NULL, NULL);