From 288fc561b7c4bee5f81d813627e028d95ebf8249 Mon Sep 17 00:00:00 2001 From: Fu Hanxi Date: Wed, 16 Jul 2025 08:40:39 +0200 Subject: [PATCH] tests: fix skipif markers. use `temp_skip` instead --- .../esp_http_client/pytest_esp_http_client.py | 11 +++++++---- tools/test_apps/system/panic/pytest_panic.py | 7 +++---- 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/examples/protocols/esp_http_client/pytest_esp_http_client.py b/examples/protocols/esp_http_client/pytest_esp_http_client.py index c329a16503..6c44b8b3f7 100644 --- a/examples/protocols/esp_http_client/pytest_esp_http_client.py +++ b/examples/protocols/esp_http_client/pytest_esp_http_client.py @@ -109,9 +109,6 @@ def test_examples_protocol_esp_http_client_dynamic_buffer(dut: Dut) -> None: @pytest.mark.host_test -# Currently we are just testing the build for esp_http_client on Linux target. So skipping the test run. -# Later we will enable the test run for Linux target as well. -@pytest.mark.skipif('config.getvalue("target") == "linux"', reason='Do not run on Linux') @pytest.mark.parametrize( 'config', [ @@ -121,5 +118,11 @@ def test_examples_protocol_esp_http_client_dynamic_buffer(dut: Dut) -> None: indirect=True, ) @idf_parametrize('target', ['linux'], indirect=['target']) -def test_examples_protocol_esp_http_client_linux(dut: Dut) -> None: +def test_examples_protocol_esp_http_client_linux(target: str, dut: Dut) -> None: + if target == 'linux': + pytest.skip( + 'Currently we are just testing the build for esp_http_client on Linux target. ' + 'So skipping the test run. Later we will enable the test run for Linux target as well.' + ) + dut.expect('Finish http example', timeout=60) diff --git a/tools/test_apps/system/panic/pytest_panic.py b/tools/test_apps/system/panic/pytest_panic.py index 76c77c076c..23f062f063 100644 --- a/tools/test_apps/system/panic/pytest_panic.py +++ b/tools/test_apps/system/panic/pytest_panic.py @@ -936,11 +936,10 @@ def test_rtc_fast_reg1_execute_violation(dut: PanicTestDut, test_func_name: str) @pytest.mark.generic -@pytest.mark.skipif( - 'config.getvalue("target") in ["esp32c5", "esp32c6", "esp32h2", "esp32p4", "esp32h21"]', - reason='Not a violation condition, no PMS peripheral case', +@pytest.mark.temp_skip( + targets=['esp32c5', 'esp32c6', 'esp32h2', 'esp32p4', 'esp32h21'], + reason='Not a violation condition, no PMS peripheral cases', ) -@pytest.mark.temp_skip_ci(targets=['esp32h21'], reason='lack of runners') @idf_parametrize('config, target', CONFIGS_MEMPROT_RTC_FAST_MEM, indirect=['config', 'target']) def test_rtc_fast_reg2_execute_violation(dut: PanicTestDut, test_func_name: str) -> None: dut.run_test_func(test_func_name)