ci: Add esp32s3 runner for usb device example tests

- CI USB device tests are run on esp32s3
    - usb_host env_marker removed - not used anymore
    - failing usb_device_ncm test fixed
pull/13338/head
Peter Marcisovsky 2024-02-23 11:52:45 +01:00
rodzic 1360f1b0a9
commit 1302fd70ba
9 zmienionych plików z 15 dodań i 17 usunięć

Wyświetl plik

@ -424,7 +424,7 @@ examples/peripherals/usb/device:
disable:
- if: SOC_USB_OTG_SUPPORTED != 1
disable_test:
- if: IDF_TARGET not in ["esp32s2"]
- if: IDF_TARGET not in ["esp32s2", "esp32s3"]
temporary: true
reason: lack of runners with usb_device tag
depends_components:
@ -437,7 +437,7 @@ examples/peripherals/usb/device/tusb_ncm:
disable:
- if: SOC_USB_OTG_SUPPORTED != 1 or SOC_WIFI_SUPPORTED != 1
disable_test:
- if: IDF_TARGET not in ["esp32s2"]
- if: IDF_TARGET not in ["esp32s2", "esp32s3"]
temporary: true
reason: lack of runners with usb_device tag
depends_components:

Wyświetl plik

@ -1,4 +1,4 @@
# SPDX-FileCopyrightText: 2023 Espressif Systems (Shanghai) CO LTD
# SPDX-FileCopyrightText: 2023-2024 Espressif Systems (Shanghai) CO LTD
# SPDX-License-Identifier: CC0-1.0
from time import sleep
@ -11,7 +11,7 @@ from serial.tools.list_ports import comports
@pytest.mark.esp32s2
@pytest.mark.esp32s3
@pytest.mark.esp32p4
@pytest.mark.temp_skip_ci(targets=['esp32s3', 'esp32p4'], reason='lack of runners with usb_device tag')
@pytest.mark.temp_skip_ci(targets=['esp32p4'], reason='lack of runners with usb_device tag')
@pytest.mark.usb_device
def test_usb_composite_device_serial_example(dut: Dut) -> None:
dut.expect_exact('Hello World!')

Wyświetl plik

@ -1,4 +1,4 @@
# SPDX-FileCopyrightText: 2022 Espressif Systems (Shanghai) CO LTD
# SPDX-FileCopyrightText: 2022-2024 Espressif Systems (Shanghai) CO LTD
# SPDX-License-Identifier: CC0-1.0
from time import sleep
@ -11,7 +11,7 @@ from serial.tools.list_ports import comports
@pytest.mark.esp32s2
@pytest.mark.esp32s3
@pytest.mark.esp32p4
@pytest.mark.temp_skip_ci(targets=['esp32s3', 'esp32p4'], reason='lack of runners with usb_device tag')
@pytest.mark.temp_skip_ci(targets=['esp32p4'], reason='lack of runners with usb_device tag')
@pytest.mark.usb_device
def test_usb_device_console_example(dut: Dut) -> None:
dut.expect_exact('USB initialization DONE')

Wyświetl plik

@ -1,4 +1,4 @@
# SPDX-FileCopyrightText: 2022 Espressif Systems (Shanghai) CO LTD
# SPDX-FileCopyrightText: 2022-2024 Espressif Systems (Shanghai) CO LTD
# SPDX-License-Identifier: CC0-1.0
import pytest
from pytest_embedded import Dut
@ -7,7 +7,7 @@ from pytest_embedded import Dut
@pytest.mark.esp32s2
@pytest.mark.esp32s3
@pytest.mark.esp32p4
@pytest.mark.temp_skip_ci(targets=['esp32s3', 'esp32p4'], reason='lack of runners with usb_device tag')
@pytest.mark.temp_skip_ci(targets=['esp32p4'], reason='lack of runners with usb_device tag')
@pytest.mark.usb_device
def test_usb_device_hid_example(dut: Dut) -> None:
dut.expect_exact('USB initialization DONE')

Wyświetl plik

@ -1,4 +1,4 @@
# SPDX-FileCopyrightText: 2022 Espressif Systems (Shanghai) CO LTD
# SPDX-FileCopyrightText: 2022-2024 Espressif Systems (Shanghai) CO LTD
# SPDX-License-Identifier: CC0-1.0
import pytest
from pytest_embedded import Dut
@ -7,7 +7,7 @@ from pytest_embedded import Dut
@pytest.mark.esp32s2
@pytest.mark.esp32s3
@pytest.mark.esp32p4
@pytest.mark.temp_skip_ci(targets=['esp32s3', 'esp32p4'], reason='lack of runners with usb_device tag')
@pytest.mark.temp_skip_ci(targets=['esp32p4'], reason='lack of runners with usb_device tag')
@pytest.mark.usb_device
def test_usb_device_midi_example(dut: Dut) -> None:
dut.expect_exact('USB initialization DONE')

Wyświetl plik

@ -7,7 +7,7 @@ from pytest_embedded import Dut
@pytest.mark.esp32s2
@pytest.mark.esp32s3
@pytest.mark.esp32p4
@pytest.mark.temp_skip_ci(targets=['esp32s3', 'esp32p4'], reason='lack of runners with usb_device tag')
@pytest.mark.temp_skip_ci(targets=['esp32p4'], reason='lack of runners with usb_device tag')
@pytest.mark.usb_device
def test_usb_device_msc_example(dut: Dut) -> None:
dut.expect('Mount storage')

Wyświetl plik

@ -1,4 +1,4 @@
# SPDX-FileCopyrightText: 2022-2023 Espressif Systems (Shanghai) CO LTD
# SPDX-FileCopyrightText: 2022-2024 Espressif Systems (Shanghai) CO LTD
# SPDX-License-Identifier: CC0-1.0
import subprocess
import time
@ -9,14 +9,13 @@ from pytest_embedded import Dut
@pytest.mark.esp32s2
@pytest.mark.esp32s3
@pytest.mark.temp_skip_ci(targets=['esp32s3'], reason='lack of runners with usb_device tag')
@pytest.mark.usb_device
def test_usb_device_ncm_example(dut: Dut) -> None:
netif_mac = dut.expect(r'Network interface HW address: ([0-9A-Fa-f]{2}:[0-9A-Fa-f]{2}:[0-9A-Fa-f]{2}:[0-9A-Fa-f]{2}:[0-9A-Fa-f]{2}:[0-9A-Fa-f]{2})')
netif_mac = netif_mac.group(1).decode('utf-8')
dut.expect_exact('USB NCM and WiFi initialized and started')
dut.expect_exact('Returned from app_main()')
time.sleep(1) # Wait 1s for the network interface to appear
time.sleep(5) # Wait 5s for the network interface to appear
out_bytes = subprocess.check_output('ifconfig', shell=True, timeout=5)
out_str = out_bytes.decode('utf-8')
print('expected network interface HW address: ', netif_mac)

Wyświetl plik

@ -1,4 +1,4 @@
# SPDX-FileCopyrightText: 2022 Espressif Systems (Shanghai) CO LTD
# SPDX-FileCopyrightText: 2022-2024 Espressif Systems (Shanghai) CO LTD
# SPDX-License-Identifier: CC0-1.0
from time import sleep
@ -11,7 +11,7 @@ from serial.tools.list_ports import comports
@pytest.mark.esp32s2
@pytest.mark.esp32s3
@pytest.mark.esp32p4
@pytest.mark.temp_skip_ci(targets=['esp32s3', 'esp32p4'], reason='lack of runners with usb_device tag')
@pytest.mark.temp_skip_ci(targets=['esp32p4'], reason='lack of runners with usb_device tag')
@pytest.mark.usb_device
def test_usb_device_serial_example(dut: Dut) -> None:
dut.expect_exact('USB initialization DONE')

Wyświetl plik

@ -58,7 +58,6 @@ ENV_MARKERS = {
'eth_dm9051': 'SPI Ethernet module with two DM9051',
'quad_psram': 'runners with quad psram',
'octal_psram': 'runners with octal psram',
'usb_host': 'usb host runners',
'usb_host_flash_disk': 'usb host runners with USB flash disk attached',
'usb_device': 'usb device runners',
'ethernet_ota': 'ethernet OTA runners',