mirror of
https://github.com/espressif/esp-idf.git
synced 2026-04-27 11:03:11 +00:00
fix(ci): re-enabled ESP32P4 tests on different HW vers
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
|
||||
components/esp_eth/test_apps:
|
||||
enable:
|
||||
- if: IDF_TARGET in ["esp32"] # TODO: IDF-14365
|
||||
- if: IDF_TARGET in ["esp32", "esp32p4"]
|
||||
reason: ESP32 and ESP32P4 have internal EMAC. SPI Ethernet runners are based on ESP32.
|
||||
depends_components:
|
||||
- esp_eth
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
# EMAC Test
|
||||
| Supported Targets | ESP32 |
|
||||
| ----------------- | ----- |
|
||||
| Supported Targets | ESP32 | ESP32-P4 |
|
||||
| ----------------- | ----- | -------- |
|
||||
|
||||
This test app is used to test Ethernet MAC behavior with different chips.
|
||||
|
||||
|
||||
@@ -288,45 +288,42 @@ def test_esp_eth_ip101(dut: IdfDut) -> None:
|
||||
|
||||
|
||||
# ----------- IP101 ESP32P4 -----------
|
||||
@pytest.mark.eth_ip101
|
||||
@pytest.mark.parametrize(
|
||||
'config',
|
||||
'config, target',
|
||||
[
|
||||
'default_generic_esp32p4',
|
||||
pytest.param('default_generic_esp32p4', 'esp32p4', marks=[pytest.mark.eth_ip101]),
|
||||
pytest.param('default_generic_esp32p4v1', 'esp32p4', marks=[pytest.mark.eth_ip101, pytest.mark.esp32p4_eco4]),
|
||||
],
|
||||
indirect=True,
|
||||
indirect=['target'],
|
||||
)
|
||||
@idf_parametrize('target', ['esp32p4'], indirect=['target'])
|
||||
def test_esp32p4_ethernet(dut: IdfDut) -> None:
|
||||
ethernet_test(dut)
|
||||
dut.serial.hard_reset()
|
||||
ethernet_l2_test(dut)
|
||||
|
||||
|
||||
@pytest.mark.eth_ip101
|
||||
@pytest.mark.parametrize(
|
||||
'config',
|
||||
'config, target',
|
||||
[
|
||||
'default_generic_esp32p4',
|
||||
pytest.param('default_generic_esp32p4', 'esp32p4', marks=[pytest.mark.eth_ip101]),
|
||||
pytest.param('default_generic_esp32p4v1', 'esp32p4', marks=[pytest.mark.eth_ip101, pytest.mark.esp32p4_eco4]),
|
||||
],
|
||||
indirect=True,
|
||||
indirect=['target'],
|
||||
)
|
||||
@idf_parametrize('target', ['esp32p4'], indirect=['target'])
|
||||
def test_esp32p4_emac(dut: IdfDut) -> None:
|
||||
ethernet_int_emac_test(dut)
|
||||
dut.serial.hard_reset()
|
||||
ethernet_heap_alloc_test(dut)
|
||||
|
||||
|
||||
@pytest.mark.eth_ip101
|
||||
@pytest.mark.parametrize(
|
||||
'config',
|
||||
'config, target',
|
||||
[
|
||||
'rmii_clko_esp32p4',
|
||||
pytest.param('rmii_clko_esp32p4', 'esp32p4', marks=[pytest.mark.eth_ip101]),
|
||||
pytest.param('rmii_clko_esp32p4v1', 'esp32p4', marks=[pytest.mark.eth_ip101, pytest.mark.esp32p4_eco4]),
|
||||
],
|
||||
indirect=True,
|
||||
indirect=['target'],
|
||||
)
|
||||
@idf_parametrize('target', ['esp32p4'], indirect=['target'])
|
||||
def test_esp32p4_emac_clko(dut: IdfDut) -> None:
|
||||
dut.run_all_single_board_cases(group='esp_emac_clk_out')
|
||||
|
||||
|
||||
@@ -0,0 +1,12 @@
|
||||
CONFIG_IDF_TARGET="esp32p4"
|
||||
CONFIG_ESP32P4_SELECTS_REV_LESS_V3=y
|
||||
|
||||
CONFIG_UNITY_ENABLE_FIXTURE=y
|
||||
CONFIG_UNITY_ENABLE_IDF_TEST_RUNNER=y
|
||||
CONFIG_ETH_USE_ESP32_EMAC=y
|
||||
CONFIG_ESP_TASK_WDT_EN=n
|
||||
|
||||
CONFIG_TARGET_USE_INTERNAL_ETHERNET=y
|
||||
CONFIG_TARGET_ETH_PHY_DEVICE_GENERIC=y
|
||||
|
||||
CONFIG_TARGET_USE_DEFAULT_EMAC_CONFIG=y
|
||||
@@ -0,0 +1,18 @@
|
||||
CONFIG_IDF_TARGET="esp32p4"
|
||||
CONFIG_ESP32P4_SELECTS_REV_LESS_V3=y
|
||||
|
||||
CONFIG_UNITY_ENABLE_FIXTURE=y
|
||||
CONFIG_UNITY_ENABLE_IDF_TEST_RUNNER=y
|
||||
CONFIG_ETH_USE_ESP32_EMAC=y
|
||||
CONFIG_ESP_TASK_WDT_EN=n
|
||||
|
||||
CONFIG_TARGET_USE_INTERNAL_ETHERNET=y
|
||||
CONFIG_TARGET_ETH_PHY_DEVICE_GENERIC=y
|
||||
|
||||
CONFIG_TARGET_USE_DEFAULT_EMAC_CONFIG=y
|
||||
|
||||
CONFIG_TARGET_RMII_CLK_OUT=y
|
||||
# Test board needs to be modified!
|
||||
# Connect GPIO23 to GPIO32 via wire.
|
||||
CONFIG_TARGET_RMII_CLK_OUT_GPIO=23
|
||||
CONFIG_TARGET_RMII_CLK_IN_GPIO=32
|
||||
@@ -13,7 +13,7 @@ components/esp_netif/test_apps/test_app_esp_netif:
|
||||
|
||||
components/esp_netif/test_apps/test_app_vfs_l2tap:
|
||||
disable:
|
||||
- if: IDF_TARGET not in ["esp32"] # TODO: IDF-14365
|
||||
- if: IDF_TARGET not in ["esp32", "esp32p4"]
|
||||
temporary: true
|
||||
reason: Not needed to test on all targets (chosen two, one for each architecture plus P4 tests time stamping)
|
||||
depends_components:
|
||||
|
||||
@@ -1,2 +1,2 @@
|
||||
| Supported Targets | ESP32 |
|
||||
| ----------------- | ----- |
|
||||
| Supported Targets | ESP32 | ESP32-P4 |
|
||||
| ----------------- | ----- | -------- |
|
||||
|
||||
@@ -2,30 +2,15 @@
|
||||
# SPDX-License-Identifier: CC0-1.0
|
||||
import pytest
|
||||
from pytest_embedded import Dut
|
||||
from pytest_embedded_idf.utils import idf_parametrize
|
||||
|
||||
|
||||
@pytest.mark.ethernet
|
||||
@pytest.mark.parametrize(
|
||||
'config',
|
||||
'config, target',
|
||||
[
|
||||
'defaults',
|
||||
pytest.param('default_esp32', 'esp32', marks=[pytest.mark.eth_ip101]),
|
||||
pytest.param('default_esp32p4', 'esp32p4', marks=[pytest.mark.eth_ip101]),
|
||||
],
|
||||
indirect=True,
|
||||
indirect=['target'],
|
||||
)
|
||||
@idf_parametrize('target', ['esp32'], indirect=['target'])
|
||||
def test_esp_netif_vfs_l2tp(dut: Dut) -> None:
|
||||
dut.run_all_single_board_cases()
|
||||
|
||||
|
||||
@pytest.mark.eth_ip101
|
||||
@pytest.mark.parametrize(
|
||||
'config',
|
||||
[
|
||||
'defaults',
|
||||
],
|
||||
indirect=True,
|
||||
)
|
||||
@idf_parametrize('target', ['esp32p4'], indirect=['target'])
|
||||
def test_esp_netif_vfs_l2tp_p4(dut: Dut) -> None:
|
||||
dut.run_all_single_board_cases()
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
CONFIG_IDF_TARGET="esp32"
|
||||
@@ -0,0 +1 @@
|
||||
CONFIG_IDF_TARGET="esp32p4"
|
||||
@@ -4,7 +4,7 @@ examples/ethernet/basic:
|
||||
enable:
|
||||
- if: INCLUDE_DEFAULT == 1
|
||||
disable:
|
||||
- if: IDF_TARGET not in ["esp32"] # TODO: IDF-14365
|
||||
- if: IDF_TARGET not in ["esp32", "esp32p4"]
|
||||
depends_components:
|
||||
- esp_eth
|
||||
- esp_netif
|
||||
@@ -17,7 +17,7 @@ examples/ethernet/iperf:
|
||||
- if: IDF_TARGET in ["esp32h21", "esp32h4"]
|
||||
temporary: true
|
||||
reason: not supported yet # TODO: [ESP32H21] IDF-11581 [ESP32H4] IDF-12360
|
||||
- if: IDF_TARGET not in ["esp32"] # TODO: IDF-14365
|
||||
- if: IDF_TARGET not in ["esp32", "esp32p4"]
|
||||
temporary: true
|
||||
reason: lack of runners
|
||||
depends_components:
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
| Supported Targets | ESP32 |
|
||||
| ----------------- | ----- |
|
||||
| Supported Targets | ESP32 | ESP32-P4 |
|
||||
| ----------------- | ----- | -------- |
|
||||
|
||||
# Basic Ethernet Example
|
||||
(See the README.md file in the upper level 'examples' directory for more information about examples.)
|
||||
|
||||
@@ -12,7 +12,8 @@ from pytest_embedded import Dut
|
||||
[
|
||||
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]),
|
||||
pytest.param('defaults_esp32p4', 'esp32p4', marks=[pytest.mark.eth_ip101]),
|
||||
pytest.param('defaults_esp32p4v1', 'esp32p4', marks=[pytest.mark.eth_ip101, pytest.mark.esp32p4_eco4]),
|
||||
],
|
||||
indirect=['target'],
|
||||
)
|
||||
|
||||
@@ -0,0 +1,4 @@
|
||||
CONFIG_IDF_TARGET="esp32p4"
|
||||
|
||||
CONFIG_ETH_ENABLED=y
|
||||
CONFIG_ETH_USE_ESP32_EMAC=y
|
||||
@@ -0,0 +1,5 @@
|
||||
CONFIG_IDF_TARGET="esp32p4"
|
||||
CONFIG_ESP32P4_SELECTS_REV_LESS_V3=y
|
||||
|
||||
CONFIG_ETH_ENABLED=y
|
||||
CONFIG_ETH_USE_ESP32_EMAC=y
|
||||
@@ -1,5 +1,5 @@
|
||||
| Supported Targets | ESP32 |
|
||||
| ----------------- | ----- |
|
||||
| Supported Targets | ESP32 | ESP32-P4 |
|
||||
| ----------------- | ----- | -------- |
|
||||
|
||||
# Ethernet iperf Example
|
||||
|
||||
|
||||
@@ -135,15 +135,14 @@ def test_esp_eth_iperf_ip101(
|
||||
test_esp_eth_iperf(dut, log_performance, check_performance, udp_tx_bw_lim=90)
|
||||
|
||||
|
||||
@pytest.mark.eth_ip101
|
||||
@pytest.mark.parametrize(
|
||||
'config',
|
||||
'config, target',
|
||||
[
|
||||
'default_ip101_esp32p4',
|
||||
pytest.param('default_ip101_esp32p4', 'esp32p4', marks=[pytest.mark.eth_ip101]),
|
||||
pytest.param('default_ip101_esp32p4v1', 'esp32p4', marks=[pytest.mark.eth_ip101, pytest.mark.esp32p4_eco4]),
|
||||
],
|
||||
indirect=True,
|
||||
indirect=['target'],
|
||||
)
|
||||
@idf_parametrize('target', ['esp32p4'], indirect=['target'])
|
||||
def test_esp_eth_iperf_ip101_esp32p4(
|
||||
dut: Dut,
|
||||
log_performance: Callable[[str, object], None],
|
||||
|
||||
@@ -0,0 +1,52 @@
|
||||
CONFIG_IDF_TARGET="esp32p4"
|
||||
CONFIG_ESP32P4_SELECTS_REV_LESS_V3=y
|
||||
|
||||
# Increase main task stack size
|
||||
CONFIG_ESP_MAIN_TASK_STACK_SIZE=7168
|
||||
|
||||
# Enable filesystem for console commands history storage
|
||||
CONFIG_ESPTOOLPY_FLASHSIZE_4MB=y
|
||||
CONFIG_PARTITION_TABLE_CUSTOM=y
|
||||
CONFIG_PARTITION_TABLE_CUSTOM_FILENAME="partitions_example.csv"
|
||||
CONFIG_PARTITION_TABLE_FILENAME="partitions_example.csv"
|
||||
|
||||
# Enable FreeRTOS stats formatting functions, needed for 'tasks' command
|
||||
CONFIG_FREERTOS_USE_TRACE_FACILITY=y
|
||||
CONFIG_FREERTOS_USE_STATS_FORMATTING_FUNCTIONS=y
|
||||
|
||||
# --------------------------------
|
||||
# Performance optimization options
|
||||
# --------------------------------
|
||||
# The lwIP and iperf tasks have a serial dependency (i.e., iperf must wait for lwIP to process packets),
|
||||
# meaning that running in multi-core mode does not significantly improve performance. Additionally,
|
||||
# IRAM optimizations have a more noticeable effect in single-core mode.
|
||||
# However, while a single-core configuration can enhance iperf performance in controlled or isolated
|
||||
# testing scenarios, it may not be optimal for real-world applications where the system also needs to
|
||||
# handle additional, non-network-related tasks. In such cases, multi-core configurations might be better
|
||||
# suited for balancing workloads and ensuring overall system responsiveness.
|
||||
|
||||
# Run FreeRTOS only on the first core
|
||||
CONFIG_FREERTOS_UNICORE=y
|
||||
|
||||
# Disable watch dog
|
||||
CONFIG_ESP_INT_WDT=n
|
||||
CONFIG_ESP_TASK_WDT_EN=n
|
||||
|
||||
# Enable lwIP IRAM optimization
|
||||
CONFIG_LWIP_IRAM_OPTIMIZATION=y
|
||||
CONFIG_LWIP_EXTRA_IRAM_OPTIMIZATION=y
|
||||
|
||||
# Enable Ethernet IRAM optimization
|
||||
CONFIG_ETH_IRAM_OPTIMIZATION=y
|
||||
|
||||
CONFIG_ETH_ENABLED=y
|
||||
CONFIG_ETH_USE_ESP32_EMAC=y
|
||||
|
||||
# Config Ethernet Init
|
||||
CONFIG_ETHERNET_INTERNAL_SUPPORT=y
|
||||
CONFIG_ETHERNET_PHY_IP101=y
|
||||
CONFIG_ETHERNET_PHY_INTERFACE_RMII=y
|
||||
CONFIG_ETHERNET_MDC_GPIO=31
|
||||
CONFIG_ETHERNET_MDIO_GPIO=52
|
||||
CONFIG_ETHERNET_PHY_RST_GPIO=51
|
||||
CONFIG_ETHERNET_PHY_ADDR=1
|
||||
@@ -11,7 +11,6 @@ import netifaces
|
||||
import pytest
|
||||
from common_test_methods import get_host_ip4_by_dest_ip
|
||||
from pytest_embedded import Dut
|
||||
from pytest_embedded_idf.utils import idf_parametrize
|
||||
|
||||
PORT = 3333
|
||||
IPV6_REGEX = (
|
||||
@@ -156,10 +155,12 @@ def test_examples_udp_multicast_proto(dut: Dut, ip_version: str = 'ipv4', nic: s
|
||||
sock.close()
|
||||
|
||||
|
||||
@pytest.mark.eth_ip101
|
||||
@idf_parametrize(
|
||||
'target',
|
||||
['esp32', 'esp32p4'],
|
||||
@pytest.mark.parametrize(
|
||||
'config, target',
|
||||
[
|
||||
pytest.param('default', 'esp32', marks=[pytest.mark.eth_ip101]),
|
||||
pytest.param('default', 'esp32p4', marks=[pytest.mark.eth_ip101]),
|
||||
],
|
||||
indirect=['target'],
|
||||
)
|
||||
def test_examples_udp_multicast(dut: Dut) -> None:
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
CONFIG_IDF_TARGET="esp32"
|
||||
|
||||
CONFIG_EXAMPLE_IPV4_V6=y
|
||||
CONFIG_EXAMPLE_LOOPBACK=n
|
||||
CONFIG_EXAMPLE_CONNECT_IPV6=y
|
||||
@@ -8,7 +6,4 @@ CONFIG_EXAMPLE_CONNECT_ETHERNET=y
|
||||
CONFIG_EXAMPLE_CONNECT_WIFI=n
|
||||
CONFIG_ETHERNET_INTERNAL_SUPPORT=y
|
||||
CONFIG_ETHERNET_PHY_GENERIC=y
|
||||
CONFIG_ETHERNET_MDC_GPIO=23
|
||||
CONFIG_ETHERNET_MDIO_GPIO=18
|
||||
CONFIG_ETHERNET_PHY_RST_GPIO=5
|
||||
CONFIG_ETHERNET_PHY_ADDR=1
|
||||
CONFIG_ETHERNET_PHY_ADDR=-1
|
||||
|
||||
@@ -1,14 +0,0 @@
|
||||
CONFIG_IDF_TARGET="esp32p4"
|
||||
|
||||
CONFIG_EXAMPLE_IPV4_V6=y
|
||||
CONFIG_EXAMPLE_LOOPBACK=n
|
||||
CONFIG_EXAMPLE_CONNECT_IPV6=y
|
||||
|
||||
CONFIG_EXAMPLE_CONNECT_ETHERNET=y
|
||||
CONFIG_EXAMPLE_CONNECT_WIFI=n
|
||||
CONFIG_ETHERNET_INTERNAL_SUPPORT=y
|
||||
CONFIG_ETHERNET_PHY_GENERIC=y
|
||||
CONFIG_ETHERNET_MDC_GPIO=23
|
||||
CONFIG_ETHERNET_MDIO_GPIO=18
|
||||
CONFIG_ETHERNET_PHY_RST_GPIO=5
|
||||
CONFIG_ETHERNET_PHY_ADDR=1
|
||||
Reference in New Issue
Block a user