diff --git a/components/esp_ringbuf/test_apps/main/test_ringbuf.c b/components/esp_ringbuf/test_apps/main/test_ringbuf.c index 09fdc04f02..18e640a499 100644 --- a/components/esp_ringbuf/test_apps/main/test_ringbuf.c +++ b/components/esp_ringbuf/test_apps/main/test_ringbuf.c @@ -753,7 +753,8 @@ out: return need_yield; } -TEST_CASE("Test ring buffer ISR", "[esp_ringbuf]") +// IDF-6471 - test hangs up on QEMU +TEST_CASE("Test ring buffer ISR", "[esp_ringbuf][qemu-ignore]") { gptimer_handle_t gptimer; for (int i = 0; i < NO_OF_RB_TYPES; i++) { diff --git a/components/esp_ringbuf/test_apps/main/test_ringbuf_main.c b/components/esp_ringbuf/test_apps/main/test_ringbuf_main.c index b131f2b318..c9e3a516c4 100644 --- a/components/esp_ringbuf/test_apps/main/test_ringbuf_main.c +++ b/components/esp_ringbuf/test_apps/main/test_ringbuf_main.c @@ -1,9 +1,11 @@ /* - * SPDX-FileCopyrightText: 2022 Espressif Systems (Shanghai) CO LTD + * SPDX-FileCopyrightText: 2022-2023 Espressif Systems (Shanghai) CO LTD * * SPDX-License-Identifier: Apache-2.0 */ +#include "freertos/FreeRTOS.h" +#include "freertos/task.h" #include "unity.h" #include "unity_test_runner.h" #include "esp_heap_caps.h" @@ -29,6 +31,8 @@ void setUp(void) void tearDown(void) { + // Add a short delay of 100ms to allow the idle task to free any remaining memory + vTaskDelay(pdMS_TO_TICKS(100)); size_t after_free_8bit = heap_caps_get_free_size(MALLOC_CAP_8BIT); size_t after_free_32bit = heap_caps_get_free_size(MALLOC_CAP_32BIT); check_leak(before_free_8bit, after_free_8bit, "8BIT"); diff --git a/components/esp_ringbuf/test_apps/pytest_esp_ringbuf.py b/components/esp_ringbuf/test_apps/pytest_esp_ringbuf.py index 89c70ed267..31c6c5ac2d 100644 --- a/components/esp_ringbuf/test_apps/pytest_esp_ringbuf.py +++ b/components/esp_ringbuf/test_apps/pytest_esp_ringbuf.py @@ -9,6 +9,7 @@ from pytest_embedded import Dut @pytest.mark.esp32s2 @pytest.mark.esp32c3 @pytest.mark.generic +@pytest.mark.nightly_run @pytest.mark.parametrize( 'config', [ @@ -18,3 +19,20 @@ from pytest_embedded import Dut ) def test_esp_ringbuf(dut: Dut) -> None: dut.run_all_single_board_cases() + + +@pytest.mark.esp32 +@pytest.mark.esp32c3 +@pytest.mark.host_test +@pytest.mark.qemu +@pytest.mark.parametrize( + 'config', + [ + 'default', + 'ringbuf_flash' + ] +) +def test_esp_ringbuf_qemu(dut: Dut) -> None: + for case in dut.test_menu: + if 'qemu-ignore' not in case.groups and not case.is_ignored and case.type == 'normal': + dut._run_normal_case(case)