mirror of
https://github.com/espressif/esp-idf.git
synced 2024-10-05 20:47:46 -04:00
change(freertos): Test tick and idle hooks in options test
Add CONFIG_FREERTOS_USE_TICK_HOOK and CONFIG_FREERTOS_USE_IDLE_HOOK to sdkconfig.ci.freertos_options to ensure those options are tested.
This commit is contained in:
parent
e4eaa28b82
commit
c15484ec58
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* SPDX-FileCopyrightText: 2022-2023 Espressif Systems (Shanghai) CO LTD
|
* SPDX-FileCopyrightText: 2022-2024 Espressif Systems (Shanghai) CO LTD
|
||||||
*
|
*
|
||||||
* SPDX-License-Identifier: Apache-2.0
|
* SPDX-License-Identifier: Apache-2.0
|
||||||
*/
|
*/
|
||||||
@ -18,11 +18,11 @@ a definition for vApplicationTickHook(). Thus this test cannot be run.
|
|||||||
#include "unity.h"
|
#include "unity.h"
|
||||||
#include "test_utils.h"
|
#include "test_utils.h"
|
||||||
|
|
||||||
#ifndef CONFIG_FREERTOS_SMP
|
#if !CONFIG_FREERTOS_SMP
|
||||||
/*
|
/*
|
||||||
Test FreeRTOS idle hook. Only compiled in if FreeRTOS idle hooks are enabled.
|
Test FreeRTOS idle hook. Only compiled in if FreeRTOS idle hooks are enabled.
|
||||||
*/
|
*/
|
||||||
#if ( configUSE_IDLE_HOOK == 1 )
|
#if CONFIG_FREERTOS_USE_IDLE_HOOK
|
||||||
|
|
||||||
static volatile unsigned idle_count;
|
static volatile unsigned idle_count;
|
||||||
|
|
||||||
@ -38,12 +38,12 @@ TEST_CASE("FreeRTOS idle hook", "[freertos]")
|
|||||||
TEST_ASSERT_NOT_EQUAL(0, idle_count); // The legacy idle hook should be called at least once
|
TEST_ASSERT_NOT_EQUAL(0, idle_count); // The legacy idle hook should be called at least once
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif // configUSE_IDLE_HOOK
|
#endif // CONFIG_FREERTOS_USE_IDLE_HOOK
|
||||||
|
|
||||||
/*
|
/*
|
||||||
Test the FreeRTOS tick hook. Only compiled in if FreeRTOS tick hooks are enabled.
|
Test the FreeRTOS tick hook. Only compiled in if FreeRTOS tick hooks are enabled.
|
||||||
*/
|
*/
|
||||||
#if ( configUSE_TICK_HOOK == 1 )
|
#if CONFIG_FREERTOS_USE_TICK_HOOK
|
||||||
|
|
||||||
static volatile unsigned tick_count;
|
static volatile unsigned tick_count;
|
||||||
|
|
||||||
@ -62,8 +62,8 @@ TEST_CASE("FreeRTOS tick hook", "[freertos]")
|
|||||||
"The FreeRTOS tick hook should have been called approx 1 time per tick per CPU");
|
"The FreeRTOS tick hook should have been called approx 1 time per tick per CPU");
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif // configUSE_TICK_HOOK
|
#endif // CONFIG_FREERTOS_USE_TICK_HOOK
|
||||||
#endif // CONFIG_FREERTOS_SMP
|
#endif // !CONFIG_FREERTOS_SMP
|
||||||
|
|
||||||
#if CONFIG_FREERTOS_TASK_PRE_DELETION_HOOK
|
#if CONFIG_FREERTOS_TASK_PRE_DELETION_HOOK
|
||||||
|
|
||||||
|
@ -17,3 +17,5 @@ CONFIG_FREERTOS_RUN_TIME_COUNTER_TYPE_U64=y
|
|||||||
CONFIG_FREERTOS_PLACE_FUNCTIONS_INTO_FLASH=y
|
CONFIG_FREERTOS_PLACE_FUNCTIONS_INTO_FLASH=y
|
||||||
CONFIG_FREERTOS_FPU_IN_ISR=y
|
CONFIG_FREERTOS_FPU_IN_ISR=y
|
||||||
CONFIG_FREERTOS_TASK_NOTIFICATION_ARRAY_ENTRIES=2
|
CONFIG_FREERTOS_TASK_NOTIFICATION_ARRAY_ENTRIES=2
|
||||||
|
CONFIG_FREERTOS_USE_TICK_HOOK=y
|
||||||
|
CONFIG_FREERTOS_USE_IDLE_HOOK=y
|
||||||
|
Loading…
Reference in New Issue
Block a user