diff --git a/tests/crypto/tinycrypt_hmac_prng/prj.conf b/tests/crypto/tinycrypt_hmac_prng/prj.conf index 8e3d3dbd04..718b2bb5dc 100644 --- a/tests/crypto/tinycrypt_hmac_prng/prj.conf +++ b/tests/crypto/tinycrypt_hmac_prng/prj.conf @@ -4,3 +4,4 @@ CONFIG_TINYCRYPT_SHA256=y CONFIG_TINYCRYPT_SHA256_HMAC=y CONFIG_TINYCRYPT_SHA256_HMAC_PRNG=y CONFIG_ZTEST=y +CONFIG_ZTEST_NEW_API=y diff --git a/tests/crypto/tinycrypt_hmac_prng/src/hmac_prng.c b/tests/crypto/tinycrypt_hmac_prng/src/hmac_prng.c index d79064f6b5..122cf92f42 100644 --- a/tests/crypto/tinycrypt_hmac_prng/src/hmac_prng.c +++ b/tests/crypto/tinycrypt_hmac_prng/src/hmac_prng.c @@ -7544,7 +7544,7 @@ unsigned int test_120(void) } -void test_hmac_prng(void) +ZTEST(hmac_prng_fn, test_hmac_prng) { unsigned int result = TC_PASS; @@ -7913,3 +7913,5 @@ void test_hmac_prng(void) TC_PRINT("\n"); TC_PRINT("All HMAC-PRNG tests succeeded!\n"); } + +ZTEST_SUITE(hmac_prng_fn, NULL, NULL, NULL, NULL, NULL); diff --git a/tests/crypto/tinycrypt_hmac_prng/src/main.c b/tests/crypto/tinycrypt_hmac_prng/src/main.c deleted file mode 100644 index 21b8560219..0000000000 --- a/tests/crypto/tinycrypt_hmac_prng/src/main.c +++ /dev/null @@ -1,16 +0,0 @@ -/* - * Copyright (c) 2017 Intel Corporation - * - * SPDX-License-Identifier: Apache-2.0 - */ - -#include -extern void test_hmac_prng(void); - -/**test case main entry*/ -void test_main(void) -{ - ztest_test_suite(test_hmac_prng_fn, - ztest_unit_test(test_hmac_prng)); - ztest_run_test_suite(test_hmac_prng_fn); -}