forked from espressif/esp-idf
unity: allow test task stack size to be configured
This commit is contained in:
15
tools/unit-test-app/components/unity/Kconfig
Normal file
15
tools/unit-test-app/components/unity/Kconfig
Normal file
@@ -0,0 +1,15 @@
|
|||||||
|
menu "Unity test framework"
|
||||||
|
|
||||||
|
config UNITY_FREERTOS_PRIORITY
|
||||||
|
int "Priority of Unity test task"
|
||||||
|
default 5
|
||||||
|
|
||||||
|
config UNITY_FREERTOS_CPU
|
||||||
|
int "CPU to run Unity test task on"
|
||||||
|
default 0
|
||||||
|
|
||||||
|
config UNITY_FREERTOS_STACK_SIZE
|
||||||
|
int "Stack size of Unity test task, in bytes"
|
||||||
|
default 8192
|
||||||
|
|
||||||
|
endmenu
|
@@ -8,10 +8,12 @@
|
|||||||
// Adapt Unity to our environment, disable FP support
|
// Adapt Unity to our environment, disable FP support
|
||||||
|
|
||||||
#include <esp_err.h>
|
#include <esp_err.h>
|
||||||
|
#include <sdkconfig.h>
|
||||||
|
|
||||||
/* Some definitions applicable to Unity running in FreeRTOS */
|
/* Some definitions applicable to Unity running in FreeRTOS */
|
||||||
#define UNITY_FREERTOS_PRIORITY 5
|
#define UNITY_FREERTOS_PRIORITY CONFIG_UNITY_FREERTOS_PRIORITY
|
||||||
#define UNITY_FREERTOS_CPU 0
|
#define UNITY_FREERTOS_CPU CONFIG_UNITY_FREERTOS_CPU
|
||||||
|
#define UNITY_FREERTOS_STACK_SIZE CONFIG_UNITY_FREERTOS_STACK_SIZE
|
||||||
|
|
||||||
#define UNITY_EXCLUDE_FLOAT
|
#define UNITY_EXCLUDE_FLOAT
|
||||||
#define UNITY_EXCLUDE_DOUBLE
|
#define UNITY_EXCLUDE_DOUBLE
|
||||||
|
@@ -1 +1,2 @@
|
|||||||
TEST_COMPONENTS=libsodium
|
TEST_COMPONENTS=libsodium
|
||||||
|
CONFIG_UNITY_FREERTOS_STACK_SIZE=12288
|
||||||
|
@@ -19,6 +19,6 @@ void app_main()
|
|||||||
|
|
||||||
// Note: if unpinning this task, change the way run times are calculated in
|
// Note: if unpinning this task, change the way run times are calculated in
|
||||||
// unity_platform
|
// unity_platform
|
||||||
xTaskCreatePinnedToCore(unityTask, "unityTask", 8192, NULL,
|
xTaskCreatePinnedToCore(unityTask, "unityTask", UNITY_FREERTOS_STACK_SIZE, NULL,
|
||||||
UNITY_FREERTOS_PRIORITY, NULL, UNITY_FREERTOS_CPU);
|
UNITY_FREERTOS_PRIORITY, NULL, UNITY_FREERTOS_CPU);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user