tests: replace CLI-dependent xfail/skipif conditions

This commit is contained in:
Fu Hanxi
2026-08-18 11:39:50 +02:00
parent e962d4e60f
commit 3a3c36ac71
5 changed files with 80 additions and 38 deletions
@@ -1,4 +1,4 @@
# SPDX-FileCopyrightText: 2022-2025 Espressif Systems (Shanghai) CO LTD
# SPDX-FileCopyrightText: 2022-2026 Espressif Systems (Shanghai) CO LTD
# SPDX-License-Identifier: CC0-1.0
import pytest
from pytest_embedded import Dut
@@ -20,18 +20,14 @@ def test_esp_event(dut: Dut) -> None:
@pytest.mark.qemu
@pytest.mark.xfail(
'config.getvalue("target") == "esp32c3"',
reason='Unstable on QEMU, needs investigation',
)
@pytest.mark.parametrize(
'config',
@idf_parametrize(
'config,target,markers',
[
'defaults',
('defaults', 'esp32'),
('defaults', 'esp32c3', (pytest.mark.xfail(reason='Unstable on QEMU, needs investigation'),)),
],
indirect=True,
indirect=['config', 'target'],
)
@idf_parametrize('target', ['esp32', 'esp32c3'], indirect=['target'])
def test_esp_event_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':