tests: drivers: move the entropy test to new ztest API
Migrate the testsuite tests/drivers/entropy/api to the new ztest API. Signed-off-by: Enjia Mai <enjia.mai@intel.com>
This commit is contained in:
parent
6f9e8f459d
commit
595e07c8b1
2 changed files with 6 additions and 5 deletions
|
|
@ -1,2 +1,3 @@
|
|||
CONFIG_ENTROPY_GENERATOR=y
|
||||
CONFIG_ZTEST=y
|
||||
CONFIG_ZTEST_NEW_API=y
|
||||
|
|
|
|||
|
|
@ -98,18 +98,18 @@ static int get_entropy(void)
|
|||
return ret;
|
||||
}
|
||||
|
||||
static void test_entropy_get_entropy(void)
|
||||
ZTEST(entropy_api, test_entropy_get_entropy)
|
||||
{
|
||||
zassert_true(get_entropy() == TC_PASS, NULL);
|
||||
}
|
||||
|
||||
void test_main(void)
|
||||
void *entropy_api_setup(void)
|
||||
{
|
||||
#ifdef CONFIG_BT
|
||||
bt_enable(NULL);
|
||||
#endif /* CONFIG_BT */
|
||||
|
||||
ztest_test_suite(entropy_api,
|
||||
ztest_unit_test(test_entropy_get_entropy));
|
||||
ztest_run_test_suite(entropy_api);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
ZTEST_SUITE(entropy_api, NULL, entropy_api_setup, NULL, NULL, NULL);
|
||||
|
|
|
|||
Loading…
Reference in a new issue