Skip to content

Commit 5429cc1

Browse files
committed
ci(esp_eth): added ESP32P4 as target for ETH tests
1 parent 83fecdd commit 5429cc1

File tree

4 files changed

+28
-7
lines changed

4 files changed

+28
-7
lines changed

components/esp_eth/test_apps/.build-test-rules.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
components/esp_eth/test_apps:
44
enable:
5-
- if: IDF_TARGET == "esp32"
6-
reason: only test on esp32
5+
- if: IDF_TARGET in ["esp32", "esp32p4"]
6+
reason: ESP32 and ESP32P4 have internal EMAC. SPI Ethernet runners are based on ESP32.
77
depends_components:
88
- esp_eth

components/esp_eth/test_apps/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# EMAC Test
2-
| Supported Targets | ESP32 |
3-
| ----------------- | ----- |
2+
| Supported Targets | ESP32 | ESP32-P4 |
3+
| ----------------- | ----- | -------- |
44

55
This test app is used to test Ethernet MAC behavior with different chips.
66

components/esp_eth/test_apps/pytest_esp_eth.py

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -265,6 +265,29 @@ def test_esp_eth_ip101(dut: IdfDut) -> None:
265265
ethernet_l2_test(dut)
266266

267267

268+
# ----------- IP101 ESP32P4 -----------
269+
@pytest.mark.esp32p4
270+
@pytest.mark.eth_ip101
271+
@pytest.mark.parametrize('config', [
272+
'default_ip101_esp32p4',
273+
], indirect=True)
274+
def test_esp32p4_ethernet(dut: IdfDut) -> None:
275+
ethernet_test(dut)
276+
dut.serial.hard_reset()
277+
ethernet_l2_test(dut)
278+
279+
280+
@pytest.mark.esp32p4
281+
@pytest.mark.eth_ip101
282+
@pytest.mark.parametrize('config', [
283+
'default_ip101_esp32p4',
284+
], indirect=True)
285+
def test_esp32p4_emac(dut: IdfDut) -> None:
286+
ethernet_int_emac_test(dut)
287+
dut.serial.hard_reset()
288+
ethernet_heap_alloc_test(dut)
289+
290+
268291
# ----------- LAN8720 -----------
269292
@pytest.mark.esp32
270293
@pytest.mark.eth_lan8720

components/esp_eth/test_apps/sdkconfig.ci.default_ip101_esp32p4

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,4 @@ CONFIG_ESP_TASK_WDT_EN=n
88
CONFIG_TARGET_USE_INTERNAL_ETHERNET=y
99
CONFIG_TARGET_ETH_PHY_DEVICE_IP101=y
1010

11-
CONFIG_TARGET_USE_DEFAULT_EMAC_CONFIG=n
12-
CONFIG_TARGET_IO_MDC=31
13-
CONFIG_TARGET_IO_MDIO=27
11+
CONFIG_TARGET_USE_DEFAULT_EMAC_CONFIG=y

0 commit comments

Comments
 (0)