mirror of
https://github.com/wolfSSL/wolfssl.git
synced 2025-08-04 13:14:45 +02:00
fix wolfssl unit test on ESP-IDF
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DNO_MAIN_DRIVER -DWOLFSSL_USER_SETTINGS")
|
||||
|
||||
set(COMPONENT_SRCDIRS ".")
|
||||
set(COMPONENT_SRCS "test_wolfssl.c")
|
||||
set(COMPONENT_ADD_INCLUDEDIRS ".")
|
||||
|
||||
set(COMPONENT_REQUIRES unity test_utils wolfssl)
|
||||
|
@@ -3,9 +3,8 @@
|
||||
The test contains of wolfSSL unit-test app on Unity.
|
||||
|
||||
When you want to run the app
|
||||
1. Copy *test.c* file at /path/to/esp-idf/components/wolfssl/wolfcrypt/test/ folder to the wolfssl/test folder
|
||||
2. Go to /esp-idf/tools/unit-test-app/ folder
|
||||
3. "idf.py menuconfig" to configure unit test app.
|
||||
4. "idf.py -T wolfssl build" to build wolfssl unit test app.
|
||||
1. Go to /esp-idf/tools/unit-test-app/ folder
|
||||
2. "idf.py menuconfig" to configure unit test app.
|
||||
3. "idf.py -T wolfssl build" to build wolfssl unit test app.
|
||||
|
||||
See [https://docs.espressif.com/projects/esp-idf/en/latest/api-guides/unit-tests.html] for more information about unit test app.
|
||||
|
@@ -34,23 +34,12 @@ static xSemaphoreHandle exit_semaph;
|
||||
static volatile bool exit_loop=false;
|
||||
static uint64_t startTime = 0;
|
||||
|
||||
#include "../wolfcrypt/test/test.c"
|
||||
|
||||
#define SHA_STACK_SIZE (20*1024)
|
||||
#define TIMES_SHA 500
|
||||
#define TIMES_AES 100
|
||||
|
||||
#ifndef NO_SHA
|
||||
int sha_test();
|
||||
#endif
|
||||
#ifndef NO_SHA256
|
||||
int sha256_test();
|
||||
#endif
|
||||
#ifdef WOLFSSL_SHA384
|
||||
int sha384_test(void);
|
||||
#endif
|
||||
#ifdef WOLFSSL_SHA512
|
||||
int sha512_test(void);
|
||||
#endif
|
||||
|
||||
static uint64_t rsa_elapsedTime = 0;
|
||||
static void esp32TimerStart()
|
||||
{
|
||||
@@ -64,7 +53,6 @@ static uint64_t esp32elapsedTime()
|
||||
}
|
||||
|
||||
#ifndef NO_RSA
|
||||
int rsa_test(void);
|
||||
static void tskRsa_Test(void *pvParam)
|
||||
{
|
||||
int ret = 0;
|
||||
@@ -89,7 +77,6 @@ static void tskRsa_Test(void *pvParam)
|
||||
#endif
|
||||
|
||||
#ifndef NO_AES
|
||||
int aes_test(void);
|
||||
static void tskAes_Test(void *pvParam)
|
||||
{
|
||||
int ret = 0;
|
||||
@@ -131,7 +118,6 @@ static void tskAesGcm_Test(void *pvParam)
|
||||
}
|
||||
|
||||
#ifdef WOLFSSL_AES_192
|
||||
int aes192_test(void);
|
||||
static void tskAes192_Test(void *pvParam)
|
||||
{
|
||||
int ret = 0;
|
||||
@@ -151,7 +137,6 @@ static void tskAes192_Test(void *pvParam)
|
||||
}
|
||||
#endif
|
||||
#ifdef WOLFSSL_AES_256
|
||||
int aes256_test(void);
|
||||
static void tskAes256_Test(void *pvParam)
|
||||
{
|
||||
int ret = 0;
|
||||
|
Reference in New Issue
Block a user