mirror of
https://github.com/espressif/esp-idf.git
synced 2026-04-27 19:13:21 +00:00
Merge branch 'fix/twai_test_split_runner_tags_v6.0' into 'release/v6.0'
fix(driver_twai): test split runner combinations (v6.0) See merge request espressif/esp-idf!46070
This commit is contained in:
@@ -12,9 +12,6 @@ components/driver/test_apps/legacy_twai:
|
||||
disable:
|
||||
- if: SOC_TWAI_SUPPORTED != 1 or SOC_TWAI_FD_SUPPORTED == 1
|
||||
reason: legacy driver doesn't support FD
|
||||
- if: IDF_TARGET == "esp32p4"
|
||||
temporary: true
|
||||
reason: p4 rev3 migration # TODO: IDF-14393
|
||||
depends_filepatterns:
|
||||
- components/driver/twai/**/*
|
||||
depends_components:
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
| Supported Targets | ESP32 | ESP32-C3 | ESP32-C6 | ESP32-H2 | ESP32-H21 | ESP32-S2 | ESP32-S3 |
|
||||
| ----------------- | ----- | -------- | -------- | -------- | --------- | -------- | -------- |
|
||||
| Supported Targets | ESP32 | ESP32-C3 | ESP32-C6 | ESP32-H2 | ESP32-H21 | ESP32-P4 | ESP32-S2 | ESP32-S3 |
|
||||
| ----------------- | ----- | -------- | -------- | -------- | --------- | -------- | -------- | -------- |
|
||||
|
||||
# Enable Socket CAN Device with bitrate 250Kbps
|
||||
|
||||
|
||||
@@ -1,8 +1,5 @@
|
||||
components/esp_driver_twai/test_apps/test_twai:
|
||||
disable:
|
||||
- if: SOC_TWAI_SUPPORTED != 1
|
||||
- if: IDF_TARGET == "esp32p4"
|
||||
temporary: true
|
||||
reason: p4 rev3 migration # TODO: IDF-14393
|
||||
depends_components:
|
||||
- esp_driver_twai
|
||||
|
||||
@@ -1,2 +1,2 @@
|
||||
| Supported Targets | ESP32 | ESP32-C3 | ESP32-C5 | ESP32-C6 | ESP32-H2 | ESP32-H21 | ESP32-H4 | ESP32-S2 | ESP32-S3 |
|
||||
| ----------------- | ----- | -------- | -------- | -------- | -------- | --------- | -------- | -------- | -------- |
|
||||
| Supported Targets | ESP32 | ESP32-C3 | ESP32-C5 | ESP32-C6 | ESP32-H2 | ESP32-H21 | ESP32-H4 | ESP32-P4 | ESP32-S2 | ESP32-S3 |
|
||||
| ----------------- | ----- | -------- | -------- | -------- | -------- | --------- | -------- | -------- | -------- | -------- |
|
||||
|
||||
@@ -525,40 +525,24 @@ examples/peripherals/touch_sensor/touch_sens_sleep:
|
||||
examples/peripherals/twai/cybergear:
|
||||
disable:
|
||||
- if: SOC_TWAI_SUPPORTED != 1
|
||||
disable_test:
|
||||
- if: IDF_TARGET == "esp32p4"
|
||||
temporary: true
|
||||
reason: p4 rev3 migration # TODO: IDF-14393
|
||||
depends_components:
|
||||
- esp_driver_twai
|
||||
|
||||
examples/peripherals/twai/twai_error_recovery:
|
||||
disable:
|
||||
- if: SOC_TWAI_SUPPORTED != 1
|
||||
disable_test:
|
||||
- if: IDF_TARGET == "esp32p4"
|
||||
temporary: true
|
||||
reason: p4 rev3 migration # TODO: IDF-14393
|
||||
depends_components:
|
||||
- esp_driver_twai
|
||||
|
||||
examples/peripherals/twai/twai_network:
|
||||
disable:
|
||||
- if: SOC_TWAI_SUPPORTED != 1
|
||||
disable_test:
|
||||
- if: IDF_TARGET == "esp32p4"
|
||||
temporary: true
|
||||
reason: p4 rev3 migration # TODO: IDF-14393
|
||||
depends_components:
|
||||
- esp_driver_twai
|
||||
|
||||
examples/peripherals/twai/twai_utils:
|
||||
disable:
|
||||
- if: SOC_TWAI_SUPPORTED != 1
|
||||
disable_test:
|
||||
- if: IDF_TARGET == "esp32p4"
|
||||
temporary: true
|
||||
reason: p4 rev3 migration # TODO: IDF-14393
|
||||
depends_components:
|
||||
- esp_driver_twai
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# SPDX-FileCopyrightText: 2025 Espressif Systems (Shanghai) CO LTD
|
||||
# SPDX-FileCopyrightText: 2025-2026 Espressif Systems (Shanghai) CO LTD
|
||||
# SPDX-License-Identifier: CC0-1.0
|
||||
import os.path
|
||||
import subprocess
|
||||
@@ -7,9 +7,6 @@ import pytest
|
||||
from can import Bus
|
||||
from can import Message
|
||||
from pytest_embedded_idf import IdfDut
|
||||
from pytest_embedded_idf.utils import soc_filtered_targets
|
||||
|
||||
TWAI_SUPPORTED_TARGETS = soc_filtered_targets('SOC_TWAI_SUPPORTED == 1')
|
||||
|
||||
|
||||
# Socket CAN fixture
|
||||
@@ -27,17 +24,6 @@ def fixture_create_socket_can() -> Bus:
|
||||
subprocess.run(stop_command, shell=True, capture_output=True, text=True)
|
||||
|
||||
|
||||
# Generate minimal combinations that each target appears in each app
|
||||
def generate_target_combinations(target_list: list, count: int = 2) -> list:
|
||||
combinations = []
|
||||
num_targets = len(target_list)
|
||||
for round_num in range(num_targets):
|
||||
selected_targets = [target_list[(round_num + i) % num_targets] for i in range(count)]
|
||||
combinations.append('|'.join(selected_targets))
|
||||
|
||||
return combinations
|
||||
|
||||
|
||||
@pytest.mark.twai_std
|
||||
@pytest.mark.parametrize('count', [2], indirect=True)
|
||||
@pytest.mark.timeout(120)
|
||||
@@ -49,15 +35,24 @@ def generate_target_combinations(target_list: list, count: int = 2) -> list:
|
||||
f'{os.path.join(os.path.dirname(__file__), "twai_sender")}',
|
||||
target_combo,
|
||||
)
|
||||
for target_combo in generate_target_combinations(TWAI_SUPPORTED_TARGETS)
|
||||
for target_combo in [ # Test each target combination and its reverse
|
||||
'esp32|esp32c6',
|
||||
'esp32c6|esp32',
|
||||
'esp32s2|esp32h2',
|
||||
'esp32h2|esp32s2',
|
||||
'esp32s3|esp32p4',
|
||||
'esp32p4|esp32s3',
|
||||
'esp32c3|esp32c5',
|
||||
'esp32c5|esp32c3',
|
||||
]
|
||||
],
|
||||
indirect=True,
|
||||
)
|
||||
def test_twai_network_multi(dut: tuple[IdfDut, IdfDut], socket_can: Bus) -> None:
|
||||
"""
|
||||
Test TWAI network communication between two nodes:
|
||||
- dut[0]: listener (first chip) - uses twai_listen_only
|
||||
- dut[1]: sender (second chip) - uses twai_sender
|
||||
- dut[0]: twai_listen_only
|
||||
- dut[1]: twai_sender
|
||||
"""
|
||||
|
||||
# Print chip information for debugging
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# SPDX-FileCopyrightText: 2025 Espressif Systems (Shanghai) CO LTD
|
||||
# SPDX-FileCopyrightText: 2025-2026 Espressif Systems (Shanghai) CO LTD
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
import subprocess
|
||||
@@ -596,7 +596,6 @@ def test_twai_utils_range_filters(twai: TwaiTestHelper) -> None:
|
||||
@pytest.mark.twai_std
|
||||
@pytest.mark.temp_skip_ci(targets=['esp32h4'], reason='no runner')
|
||||
@idf_parametrize('target', soc_filtered_targets('SOC_TWAI_SUPPORTED == 1'), indirect=['target'])
|
||||
@pytest.mark.temp_skip_ci(targets=['esp32p4'], reason='p4 rev3 migration # TODO: IDF-14393')
|
||||
def test_twai_utils_external_communication(twai: TwaiTestHelper, usb_can: CanBusManager) -> None:
|
||||
test_frames = [
|
||||
('123#DEADBEEF', 0x123, bytes.fromhex('DEADBEEF'), False),
|
||||
|
||||
Reference in New Issue
Block a user