mirror of
https://github.com/espressif/esp-idf.git
synced 2025-07-30 18:57:19 +02:00
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
This commit is contained in:
@ -8,7 +8,11 @@ import pytest
|
|||||||
from pytest_embedded import Dut
|
from pytest_embedded import Dut
|
||||||
|
|
||||||
|
|
||||||
def _real_test_func(dut: Dut) -> None:
|
@pytest.mark.parametrize('config', [
|
||||||
|
pytest.param('default', marks=[pytest.mark.supported_targets, pytest.mark.generic, pytest.mark.temp_skip(targets=['esp32c2'], reason='must have 4MB')]),
|
||||||
|
pytest.param('default', marks=[pytest.mark.esp32c2, pytest.mark.generic, pytest.mark.flash_4mb]),
|
||||||
|
], indirect=True)
|
||||||
|
def test_otatool_example(dut: Dut) -> None:
|
||||||
# Verify factory firmware
|
# Verify factory firmware
|
||||||
dut.expect('OTA Tool Example')
|
dut.expect('OTA Tool Example')
|
||||||
dut.expect('Example end')
|
dut.expect('Example end')
|
||||||
@ -24,16 +28,3 @@ def _real_test_func(dut: Dut) -> None:
|
|||||||
binary_path = flash_file[1]
|
binary_path = flash_file[1]
|
||||||
break
|
break
|
||||||
subprocess.check_call([sys.executable, script_path, '--binary', binary_path])
|
subprocess.check_call([sys.executable, script_path, '--binary', binary_path])
|
||||||
|
|
||||||
|
|
||||||
@pytest.mark.supported_targets
|
|
||||||
@pytest.mark.generic
|
|
||||||
def test_otatool_example(dut: Dut) -> None:
|
|
||||||
_real_test_func(dut)
|
|
||||||
|
|
||||||
|
|
||||||
@pytest.mark.esp32c2
|
|
||||||
@pytest.mark.generic
|
|
||||||
@pytest.mark.flash_4mb
|
|
||||||
def test_otatool_example_c2_4mb(dut: Dut) -> None:
|
|
||||||
_real_test_func(dut)
|
|
||||||
|
Reference in New Issue
Block a user