refactor(esp_system): moved shared stack tests from newlib to here

This commit is contained in:
Jakob Hasse 2023-12-08 17:25:29 +08:00
parent 692c1fcc52
commit 874d10ce11
3 changed files with 7 additions and 2 deletions

View File

@ -10,6 +10,7 @@ set(SRC "test_app_main.c"
"test_delay.c"
"test_ipc.c"
"test_reset_reason.c"
"test_shared_stack_printf.c"
"test_sleep.c"
"test_stack_check.c"
"test_system_time.c"

View File

@ -13,6 +13,10 @@
#include "test_utils.h"
#include "esp_expression_with_stack.h"
#if !TEMPORARY_DISABLED_FOR_TARGETS(ESP32P4) // TODO IDF-8832: RISC-V FPU does not work on shared stack,
// esp_execute_shared_stack_function might be deprecated because of
// the FPU issue and all the other issues with it.
#define SHARED_STACK_SIZE 8192
static StackType_t *shared_stack_sp = NULL;
@ -40,7 +44,7 @@ void another_external_stack_function(void)
shared_stack_sp = (StackType_t *)esp_cpu_get_sp();
}
TEST_CASE("test printf using shared buffer stack", "[newlib]")
TEST_CASE("test printf using shared buffer stack", "[shared_stack]")
{
StackType_t *shared_stack = malloc(SHARED_STACK_SIZE);
@ -72,3 +76,4 @@ TEST_CASE("test printf using shared buffer stack", "[newlib]")
vSemaphoreDelete(printf_lock);
free(shared_stack);
}
#endif // !TEMPORARY_DISABLED_FOR_TARGETS(ESP32P4)

View File

@ -6,7 +6,6 @@ idf_component_register(SRCS
"test_misc.c"
"test_newlib.c"
"test_setjmp.c"
"test_shared_stack_printf.c"
"test_stdatomic.c"
"test_time.c"
PRIV_REQUIRES unity vfs cmock driver esp_timer spi_flash test_utils pthread esp_psram