mirror of
https://github.com/espressif/esp-idf.git
synced 2025-08-09 20:41:14 +00:00
refactor(esp_event): improved tests to fail less frequently on QEMU
* improved setup/teardown to not put shared event system into inconsistent state * reduced timing-dependency of several tests by using a semaphore instead of waiting for a guessed timeout * Deactivated WDT (both Interrupt WDT, Task WDT) for QEMU tests * Ignore esp_timer-based test for QEMU, CPU timing is different on ESP32 simulation in QEMU
This commit is contained in:
@@ -14,10 +14,24 @@ def test_esp_event(dut: Dut) -> None:
|
||||
|
||||
|
||||
@pytest.mark.esp32
|
||||
@pytest.mark.esp32c3
|
||||
@pytest.mark.host_test
|
||||
@pytest.mark.qemu
|
||||
def test_esp_event_qemu(dut: Dut) -> None:
|
||||
@pytest.mark.parametrize('qemu_extra_args', [
|
||||
'-global driver=timer.esp32.timg,property=wdt_disable,value=true',
|
||||
], indirect=True) # need to disable wdt since it is not synchronized with target cpu clock on QEMU for ESP32
|
||||
def test_esp_event_qemu_esp32(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)
|
||||
|
||||
|
||||
@pytest.mark.esp32c3
|
||||
@pytest.mark.host_test
|
||||
@pytest.mark.qemu
|
||||
@pytest.mark.parametrize('qemu_extra_args', [
|
||||
'-icount 3',
|
||||
], indirect=True) # need to add -icount 3 to make WDT accurate on QEMU for ESP32-C3
|
||||
def test_esp_event_qemu_esp32c3(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)
|
||||
|
Reference in New Issue
Block a user