Skip to content

Commit 9e2decf

Browse files
committed
Merge branch 'ci/fix_pytest_otatool_for_c2_v5.4' into 'release/v5.4'
fix(examples): Fix pytest_otatool for C2 (v5.4) See merge request espressif/esp-idf!35116
2 parents 3915ea3 + ed5a540 commit 9e2decf

File tree

1 file changed

+5
-14
lines changed

1 file changed

+5
-14
lines changed

examples/system/ota/otatool/pytest_otatool.py

Lines changed: 5 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,11 @@
88
from pytest_embedded import Dut
99

1010

11-
def _real_test_func(dut: Dut) -> None:
11+
@pytest.mark.parametrize('config', [
12+
pytest.param('default', marks=[pytest.mark.supported_targets, pytest.mark.generic, pytest.mark.temp_skip(targets=['esp32c2'], reason='must have 4MB')]),
13+
pytest.param('default', marks=[pytest.mark.esp32c2, pytest.mark.generic, pytest.mark.flash_4mb]),
14+
], indirect=True)
15+
def test_otatool_example(dut: Dut) -> None:
1216
# Verify factory firmware
1317
dut.expect('OTA Tool Example')
1418
dut.expect('Example end')
@@ -24,16 +28,3 @@ def _real_test_func(dut: Dut) -> None:
2428
binary_path = flash_file[1]
2529
break
2630
subprocess.check_call([sys.executable, script_path, '--binary', binary_path])
27-
28-
29-
@pytest.mark.supported_targets
30-
@pytest.mark.generic
31-
def test_otatool_example(dut: Dut) -> None:
32-
_real_test_func(dut)
33-
34-
35-
@pytest.mark.esp32c2
36-
@pytest.mark.generic
37-
@pytest.mark.flash_4mb
38-
def test_otatool_example_c2_4mb(dut: Dut) -> None:
39-
_real_test_func(dut)

0 commit comments

Comments
 (0)