mirror of
https://github.com/espressif/esp-idf.git
synced 2026-08-11 01:32:09 +03:00
feat(esp_eth): removed SPI Ethernet and PHY drivers from IDF
This commit is contained in:
@@ -5,19 +5,17 @@ import subprocess
|
||||
|
||||
import pytest
|
||||
from pytest_embedded import Dut
|
||||
from pytest_embedded_idf.utils import idf_parametrize
|
||||
|
||||
|
||||
@pytest.mark.parametrize(
|
||||
'config',
|
||||
'config, target',
|
||||
[
|
||||
pytest.param('default_ip101', marks=[pytest.mark.eth_ip101]),
|
||||
pytest.param('default_generic', marks=[pytest.mark.eth_ip101]),
|
||||
pytest.param('default_dm9051', marks=[pytest.mark.eth_dm9051]),
|
||||
pytest.param('defaults', 'esp32', marks=[pytest.mark.eth_ip101]),
|
||||
pytest.param('lan8720_esp32', 'esp32', marks=[pytest.mark.eth_lan8720]),
|
||||
pytest.param('defaults', 'esp32p4', marks=[pytest.mark.eth_ip101]),
|
||||
],
|
||||
indirect=True,
|
||||
indirect=['target'],
|
||||
)
|
||||
@idf_parametrize('target', ['esp32'], indirect=['target'])
|
||||
def test_esp_eth_basic(dut: Dut) -> None:
|
||||
# wait for ip received
|
||||
dut_ip = dut.expect(r'esp_netif_handlers: .+ ip: (\d+\.\d+\.\d+\.\d+),').group(1)
|
||||
@@ -25,4 +23,5 @@ def test_esp_eth_basic(dut: Dut) -> None:
|
||||
param = '-n' if platform.system().lower() == 'windows' else '-c'
|
||||
command = ['ping', param, '1', dut_ip]
|
||||
output = subprocess.run(command, capture_output=True)
|
||||
assert 'unreachable' not in str(output.stdout)
|
||||
if 'unreachable' in str(output.stdout):
|
||||
raise RuntimeError('Host unreachable')
|
||||
|
||||
Reference in New Issue
Block a user