tests: crypto: move the tinycrypt_hmac_prng test to new ztest API
Migrate the testsuite tests/crypto/tinycrypt_hmac_prng to the new ztest API. Signed-off-by: Enjia Mai <enjia.mai@intel.com>
This commit is contained in:
parent
7a39635f0d
commit
64f096d264
3 changed files with 4 additions and 17 deletions
|
@ -4,3 +4,4 @@ CONFIG_TINYCRYPT_SHA256=y
|
||||||
CONFIG_TINYCRYPT_SHA256_HMAC=y
|
CONFIG_TINYCRYPT_SHA256_HMAC=y
|
||||||
CONFIG_TINYCRYPT_SHA256_HMAC_PRNG=y
|
CONFIG_TINYCRYPT_SHA256_HMAC_PRNG=y
|
||||||
CONFIG_ZTEST=y
|
CONFIG_ZTEST=y
|
||||||
|
CONFIG_ZTEST_NEW_API=y
|
||||||
|
|
|
@ -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;
|
unsigned int result = TC_PASS;
|
||||||
|
|
||||||
|
@ -7913,3 +7913,5 @@ void test_hmac_prng(void)
|
||||||
TC_PRINT("\n");
|
TC_PRINT("\n");
|
||||||
TC_PRINT("All HMAC-PRNG tests succeeded!\n");
|
TC_PRINT("All HMAC-PRNG tests succeeded!\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ZTEST_SUITE(hmac_prng_fn, NULL, NULL, NULL, NULL, NULL);
|
||||||
|
|
|
@ -1,16 +0,0 @@
|
||||||
/*
|
|
||||||
* Copyright (c) 2017 Intel Corporation
|
|
||||||
*
|
|
||||||
* SPDX-License-Identifier: Apache-2.0
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include <zephyr/ztest.h>
|
|
||||||
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);
|
|
||||||
}
|
|
Loading…
Add table
Add a link
Reference in a new issue