Add zephyr action
This commit is contained in:
@@ -60,6 +60,14 @@ then "Open Terminal".
|
||||
|
||||
## Build and Run wolfCrypt Test Application
|
||||
|
||||
If you want to run build apps without running `west zephyr-export` then it is
|
||||
possible by setting the `CMAKE_PREFIX_PATH` variable to the location of the
|
||||
zephyr sdk and building from the `zephyr` directory. For example:
|
||||
|
||||
```
|
||||
CMAKE_PREFIX_PATH=/path/to/zephyr-sdk-<VERSION> west build -p always -b qemu_x86 ../modules/crypto/wolfssl/zephyr/samples/wolfssl_test/
|
||||
```
|
||||
|
||||
build and execute `wolfssl_test`
|
||||
|
||||
```
|
||||
|
||||
@@ -1,7 +1,5 @@
|
||||
|
||||
# Configure stack and heap sizes
|
||||
CONFIG_MAIN_STACK_SIZE=32768
|
||||
CONFIG_MINIMAL_LIBC_MALLOC_ARENA_SIZE=16384
|
||||
|
||||
# Pthreads
|
||||
CONFIG_PTHREAD_IPC=y
|
||||
|
||||
@@ -2,9 +2,14 @@ sample:
|
||||
description: wolfCrypt benchmark sample app
|
||||
name: wolfCrypt benchmark
|
||||
common:
|
||||
min_flash: 65
|
||||
min_ram: 36
|
||||
tags: crypto wolfssl userspace random
|
||||
harness: console
|
||||
harness_config:
|
||||
type: one_line
|
||||
regex:
|
||||
- "Benchmark complete"
|
||||
tests:
|
||||
crypto.wolfssl_benchmark:
|
||||
platform_allow: qemu_x86 nrf5340dk_nrf5340_cpuapp_ns nrf5340dk_nrf5340_cpuapp
|
||||
sample.crypto.wolfssl_benchmark:
|
||||
platform_allow: qemu_x86
|
||||
integration_platforms:
|
||||
- qemu_x86
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
|
||||
# Configure stack and heap sizes
|
||||
CONFIG_MAIN_STACK_SIZE=32768
|
||||
CONFIG_MINIMAL_LIBC_MALLOC_ARENA_SIZE=16384
|
||||
CONFIG_COMMON_LIBC_MALLOC_ARENA_SIZE=16384
|
||||
|
||||
# Pthreads
|
||||
CONFIG_PTHREAD_IPC=y
|
||||
|
||||
@@ -2,9 +2,14 @@ sample:
|
||||
description: wolfCrypt test sample app
|
||||
name: wolfCrypt test
|
||||
common:
|
||||
min_flash: 65
|
||||
min_ram: 36
|
||||
tags: crypto wolfssl userspace random
|
||||
harness: console
|
||||
harness_config:
|
||||
type: one_line
|
||||
regex:
|
||||
- "Exiting main with return code: 0"
|
||||
tests:
|
||||
crypto.wolfssl_test:
|
||||
platform_allow: qemu_x86 nrf5340dk_nrf5340_cpuapp_ns nrf5340dk_nrf5340_cpuapp
|
||||
sample.crypto.wolfssl_test:
|
||||
timeout: 120
|
||||
platform_allow: qemu_x86
|
||||
integration_platforms:
|
||||
- qemu_x86
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
CONFIG_MAIN_STACK_SIZE=16384
|
||||
CONFIG_ENTROPY_GENERATOR=y
|
||||
CONFIG_INIT_STACKS=y
|
||||
CONFIG_MINIMAL_LIBC_MALLOC_ARENA_SIZE=8192
|
||||
CONFIG_COMMON_LIBC_MALLOC_ARENA_SIZE=8192
|
||||
|
||||
# General config
|
||||
CONFIG_NEWLIB_LIBC=y
|
||||
|
||||
@@ -1,9 +1,16 @@
|
||||
common:
|
||||
harness: crypto
|
||||
tags: crypto
|
||||
sample:
|
||||
description: wolfSSL TLS test application
|
||||
name: wolfSSL TLS Test
|
||||
common:
|
||||
harness: console
|
||||
harness_config:
|
||||
type: multi_line
|
||||
regex:
|
||||
- "Server Return: 0"
|
||||
- "Client Return: 0"
|
||||
tests:
|
||||
test:
|
||||
platform_whitelist: qemu_x86
|
||||
sample.crypto.wolfssl_tls_sock:
|
||||
timeout: 60
|
||||
platform_allow: qemu_x86
|
||||
integration_platforms:
|
||||
- qemu_x86
|
||||
|
||||
@@ -296,8 +296,10 @@ static void wolfssl_memstats(WOLFSSL* ssl)
|
||||
/* Start the server thread. */
|
||||
void start_thread(THREAD_CB func, func_args* args, THREAD_TYPE* thread)
|
||||
{
|
||||
/* Casting to k_thread_entry_t should be fine since we just ignore the
|
||||
* extra arguments being passed in */
|
||||
k_thread_create(thread, server_stack, K_THREAD_STACK_SIZEOF(server_stack),
|
||||
func, args, NULL, NULL, 5, 0, K_NO_WAIT);
|
||||
(k_thread_entry_t)func, args, NULL, NULL, 5, 0, K_NO_WAIT);
|
||||
}
|
||||
|
||||
void join_thread(THREAD_TYPE thread)
|
||||
@@ -350,7 +352,7 @@ int wolfssl_server_accept_tcp(WOLFSSL* ssl, SOCKET_T* fd, SOCKET_T* acceptfd)
|
||||
}
|
||||
|
||||
/* Thread to do the server operations. */
|
||||
void server_thread(void* arg1, void* arg2, void* arg3)
|
||||
void server_thread(void* arg1)
|
||||
{
|
||||
int ret = 0;
|
||||
WOLFSSL_CTX* server_ctx = NULL;
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
CONFIG_MAIN_STACK_SIZE=16384
|
||||
CONFIG_ENTROPY_GENERATOR=y
|
||||
CONFIG_INIT_STACKS=y
|
||||
CONFIG_MINIMAL_LIBC_MALLOC_ARENA_SIZE=65536
|
||||
CONFIG_COMMON_LIBC_MALLOC_ARENA_SIZE=65536
|
||||
|
||||
# Pthreads
|
||||
CONFIG_PTHREAD_IPC=y
|
||||
|
||||
@@ -1,9 +1,18 @@
|
||||
common:
|
||||
harness: crypto
|
||||
tags: crypto
|
||||
sample:
|
||||
description: wolfSSL TLS test application
|
||||
name: wolfSSL TLS Test
|
||||
common:
|
||||
harness: console
|
||||
harness_config:
|
||||
type: multi_line
|
||||
regex:
|
||||
- "Server Return: 0"
|
||||
- "Server Error: 0"
|
||||
- "Client Return: 0"
|
||||
- "Client Error: 0"
|
||||
tests:
|
||||
test:
|
||||
platform_whitelist: qemu_x86
|
||||
sample.crypto.wolfssl_tls_thread:
|
||||
timeout: 60
|
||||
platform_allow: qemu_x86
|
||||
integration_platforms:
|
||||
- qemu_x86
|
||||
|
||||
@@ -519,8 +519,10 @@ static void wolfssl_memstats(WOLFSSL* ssl)
|
||||
/* Start the server thread. */
|
||||
void start_thread(THREAD_CB func, func_args* args, THREAD_TYPE* thread)
|
||||
{
|
||||
/* Casting to k_thread_entry_t should be fine since we just ignore the
|
||||
* extra arguments being passed in */
|
||||
k_thread_create(thread, server_stack, K_THREAD_STACK_SIZEOF(server_stack),
|
||||
func, args, NULL, NULL, 5, 0, K_NO_WAIT);
|
||||
(k_thread_entry_t)func, args, NULL, NULL, 5, 0, K_NO_WAIT);
|
||||
}
|
||||
|
||||
void join_thread(THREAD_TYPE thread)
|
||||
@@ -530,7 +532,7 @@ void join_thread(THREAD_TYPE thread)
|
||||
|
||||
|
||||
/* Thread to do the server operations. */
|
||||
void server_thread(void* arg1, void* arg2, void* arg3)
|
||||
void server_thread(void* arg1)
|
||||
{
|
||||
int ret = 0;
|
||||
WOLFSSL_CTX* server_ctx = NULL;
|
||||
|
||||
Reference in New Issue
Block a user