ci: update protocol/ethernet pytest markers

This commit is contained in:
Chen Yudong 2024-01-30 18:42:22 +08:00
parent a6e2c52a43
commit a72d5f4b41
13 changed files with 78 additions and 133 deletions

View File

@ -1,7 +1,19 @@
# Documentation: .gitlab/ci/README.md#manifest-file-to-control-the-buildtest-apps
components/mqtt/test_apps:
disable:
- if: IDF_TARGET not in ["esp32", "esp32c3"]
reason: component test apps, needn't build all targets (chosen two, one for each architecture)
disable_test:
- if: IDF_TARGET not in ["esp32", "esp32c2"]
- if: IDF_TARGET != "esp32"
temporary: false
reason: Not needed to test on all targets (chosen two, one for each architecture)
reason: Only esp32 target has ethernet runners
depends_components:
- mqtt
- tcp_transport
- app_update
- esp_eth
- esp_netif
- esp_event
depends_filepatterns:
- components/mqtt/test_apps/common/**/*

View File

@ -1,2 +1,2 @@
| Supported Targets | ESP32 | ESP32-C2 | ESP32-C3 | ESP32-C6 | ESP32-H2 | ESP32-P4 | ESP32-S2 | ESP32-S3 |
| ----------------- | ----- | -------- | -------- | -------- | -------- | -------- | -------- | -------- |
| Supported Targets | ESP32 | ESP32-C3 |
| ----------------- | ----- | -------- |

View File

@ -5,7 +5,6 @@ from pytest_embedded import Dut
@pytest.mark.esp32
@pytest.mark.esp32c2
@pytest.mark.ethernet
def test_mqtt_client(dut: Dut) -> None:
dut.expect_unity_test_output()

View File

@ -1,2 +1,2 @@
| Supported Targets | ESP32 | ESP32-C2 | ESP32-C3 | ESP32-C6 | ESP32-H2 | ESP32-P4 | ESP32-S2 | ESP32-S3 |
| ----------------- | ----- | -------- | -------- | -------- | -------- | -------- | -------- | -------- |
| Supported Targets | ESP32 | ESP32-C3 |
| ----------------- | ----- | -------- |

View File

@ -5,7 +5,6 @@ from pytest_embedded import Dut
@pytest.mark.esp32
@pytest.mark.esp32c2
@pytest.mark.ethernet
def test_mqtt5_client(dut: Dut) -> None:
dut.expect_unity_test_output()

View File

@ -1,11 +1,5 @@
# Documentation: .gitlab/ci/README.md#manifest-file-to-control-the-buildtest-apps
.ethernet_dependencies: &ethernet_dependencies
# TODO: IDFCI-1821
depends_filepatterns:
- tools/ci/python_packages/common_test_methods.py
- components/esp_netif/esp_netif_handlers.c
examples/system/app_trace_basic:
disable:
- if: IDF_TARGET in ["esp32c6", "esp32h2", "esp32p4"]
@ -150,24 +144,20 @@ examples/system/ota/advanced_https_ota:
temporary: true
reason: target esp32h2, esp32p4 is not supported yet
disable_test:
- if: IDF_TARGET == "esp32c2" or IDF_TARGET == "esp32c6"
- if: IDF_TARGET not in ["esp32", "esp32c3", "esp32s3"]
temporary: true
reason: lack of runners
depends_filepatterns:
- components/esp_netif/esp_netif_handlers.c
- components/mbedtls/port/dynamic/*
- examples/common_components/**/*
- examples/ethernet/iperf/**/*
- examples/network/simple_sniffer/**/*
- examples/network/vlan_support/**/*
- examples/protocols/**/*
- examples/system/ota/**/*
- examples/wifi/**/*
- tools/ci/python_packages/common_test_methods.py
depends_components:
- app_update
- esp_https_ota
- esp_http_client
# different configs need different components
- esp_eth
- esp_wifi
- esp_phy
- bt
depends_filepatterns:
- examples/common_components/protocol_examples_common/**/*
examples/system/ota/native_ota_example:
disable:
@ -175,10 +165,17 @@ examples/system/ota/native_ota_example:
temporary: true
reason: target esp32h2, esp32p4 is not supported yet
disable_test:
- if: IDF_TARGET == "esp32c6"
temporary: true
reason: lack of runners
<<: *ethernet_dependencies
- if: IDF_TARGET != "esp32"
reason: Only esp32 has ethernet runners
depends_components:
- app_update
- esp_https_ota
- esp_http_client
- esp_eth
- esp_driver_gpio
- bootloader_support
depends_filepatterns:
- examples/common_components/protocol_examples_common/**/*
examples/system/ota/otatool:
disable:
@ -191,14 +188,19 @@ examples/system/ota/pre_encrypted_ota:
- if: IDF_TARGET in ["esp32h2", "esp32p4"]
temporary: true
reason: target esp32h2, esp32p4 is not supported yet
- if: CONFIG_NAME == "partial_download" and IDF_TARGET == "esp32c3"
temporary: true
reason: build failed
disable_test:
- if: IDF_TARGET == "esp32c2" or IDF_TARGET == "esp32c6"
- if: IDF_TARGET != "esp32"
temporary: true
reason: lack of runners
<<: *ethernet_dependencies
reason: Only esp32 has ethernet runners
depends_components:
- app_update
- esp_https_ota
- esp_http_client
- esp_eth
- mbedtls
- bootloader_support
depends_filepatterns:
- examples/common_components/protocol_examples_common/**/*
examples/system/ota/simple_ota_example:
disable:
@ -207,12 +209,18 @@ examples/system/ota/simple_ota_example:
reason: target esp32h2, esp32p4 is not supported yet
- if: CONFIG_NAME == "spiram" and SOC_SPIRAM_SUPPORTED != 1
disable_test:
- if: IDF_TARGET == "esp32c2" or IDF_TARGET == "esp32c6"
- if: IDF_TARGET not in ["esp32", "esp32c3", "esp32s3"]
temporary: true
reason: lack of runners
depends_components:
- app_update
- esp_https_ota
- esp_http_client
# different configs need different components
- esp_eth
- esp_wifi
- esp_phy
- mbedtls
examples/system/perfmon:
enable:

View File

@ -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: Unlicense OR CC0-1.0
import http.server
import multiprocessing
@ -13,7 +13,8 @@ from typing import Callable
import pexpect
import pytest
from common_test_methods import get_env_config_variable, get_host_ip4_by_dest_ip
from common_test_methods import get_env_config_variable
from common_test_methods import get_host_ip4_by_dest_ip
from pytest_embedded import Dut
from RangeHTTPServer import RangeRequestHandler
@ -94,9 +95,6 @@ def start_redirect_server(ota_image_dir: str, server_ip: str, server_port: int,
@pytest.mark.esp32
@pytest.mark.esp32c3
@pytest.mark.esp32s2
@pytest.mark.esp32s3
@pytest.mark.ethernet_ota
def test_examples_protocol_advanced_https_ota_example(dut: Dut) -> None:
"""
@ -135,9 +133,6 @@ def test_examples_protocol_advanced_https_ota_example(dut: Dut) -> None:
@pytest.mark.esp32
@pytest.mark.esp32c3
@pytest.mark.esp32s2
@pytest.mark.esp32s3
@pytest.mark.ethernet_ota
def test_examples_protocol_advanced_https_ota_example_truncated_bin(dut: Dut) -> None:
"""
@ -189,9 +184,6 @@ def test_examples_protocol_advanced_https_ota_example_truncated_bin(dut: Dut) ->
@pytest.mark.esp32
@pytest.mark.esp32c3
@pytest.mark.esp32s2
@pytest.mark.esp32s3
@pytest.mark.ethernet_ota
def test_examples_protocol_advanced_https_ota_example_truncated_header(dut: Dut) -> None:
"""
@ -243,9 +235,6 @@ def test_examples_protocol_advanced_https_ota_example_truncated_header(dut: Dut)
@pytest.mark.esp32
@pytest.mark.esp32c3
@pytest.mark.esp32s2
@pytest.mark.esp32s3
@pytest.mark.ethernet_ota
def test_examples_protocol_advanced_https_ota_example_random(dut: Dut) -> None:
"""
@ -297,9 +286,6 @@ def test_examples_protocol_advanced_https_ota_example_random(dut: Dut) -> None:
@pytest.mark.esp32
@pytest.mark.esp32c3
@pytest.mark.esp32s2
@pytest.mark.esp32s3
@pytest.mark.ethernet_ota
def test_examples_protocol_advanced_https_ota_example_invalid_chip_id(dut: Dut) -> None:
"""
@ -353,9 +339,6 @@ def test_examples_protocol_advanced_https_ota_example_invalid_chip_id(dut: Dut)
@pytest.mark.esp32
@pytest.mark.esp32c3
@pytest.mark.esp32s2
@pytest.mark.esp32s3
@pytest.mark.ethernet_ota
def test_examples_protocol_advanced_https_ota_example_chunked(dut: Dut) -> None:
"""
@ -392,9 +375,6 @@ def test_examples_protocol_advanced_https_ota_example_chunked(dut: Dut) -> None:
@pytest.mark.esp32
@pytest.mark.esp32c3
@pytest.mark.esp32s2
@pytest.mark.esp32s3
@pytest.mark.ethernet_ota
def test_examples_protocol_advanced_https_ota_example_redirect_url(dut: Dut) -> None:
"""
@ -448,9 +428,6 @@ def test_examples_protocol_advanced_https_ota_example_redirect_url(dut: Dut) ->
@pytest.mark.esp32
@pytest.mark.esp32c3
@pytest.mark.esp32s2
@pytest.mark.esp32s3
@pytest.mark.ethernet_flash_8m
@pytest.mark.parametrize('config', ['anti_rollback',], indirect=True)
@pytest.mark.parametrize('skip_autoflash', ['y'], indirect=True)
@ -519,9 +496,6 @@ def test_examples_protocol_advanced_https_ota_example_anti_rollback(dut: Dut) ->
@pytest.mark.esp32
@pytest.mark.esp32c3
@pytest.mark.esp32s2
@pytest.mark.esp32s3
@pytest.mark.ethernet_ota
@pytest.mark.parametrize('config', ['partial_download',], indirect=True)
def test_examples_protocol_advanced_https_ota_example_partial_request(dut: Dut) -> None:
@ -570,7 +544,6 @@ def test_examples_protocol_advanced_https_ota_example_partial_request(dut: Dut)
@pytest.mark.esp32
@pytest.mark.esp32c3
@pytest.mark.esp32s2
@pytest.mark.esp32s3
@pytest.mark.wifi_high_traffic
@pytest.mark.parametrize('config', ['nimble',], indirect=True)
@ -622,7 +595,6 @@ def test_examples_protocol_advanced_https_ota_example_nimble_gatts(dut: Dut) ->
@pytest.mark.esp32
@pytest.mark.esp32c3
@pytest.mark.esp32s2
@pytest.mark.esp32s3
@pytest.mark.wifi_high_traffic
@pytest.mark.parametrize('config', ['bluedroid',], indirect=True)
@ -674,9 +646,6 @@ def test_examples_protocol_advanced_https_ota_example_bluedroid_gatts(dut: Dut)
@pytest.mark.esp32
@pytest.mark.esp32c3
@pytest.mark.esp32s2
@pytest.mark.esp32s3
@pytest.mark.ethernet_ota
def test_examples_protocol_advanced_https_ota_example_openssl_aligned_bin(dut: Dut) -> None:
"""

View File

@ -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: Unlicense OR CC0-1.0
import http.server
import multiprocessing
@ -8,7 +8,8 @@ import socket
import ssl
import struct
import subprocess
from typing import Callable, Tuple
from typing import Callable
from typing import Tuple
import pexpect
import pytest
@ -122,10 +123,6 @@ def start_chunked_server(ota_image_dir: str, server_port: int) -> subprocess.Pop
@pytest.mark.esp32
@pytest.mark.esp32c3
@pytest.mark.esp32s2
@pytest.mark.esp32s3
@pytest.mark.esp32c2
@pytest.mark.ethernet_ota
def test_examples_protocol_native_ota_example(dut: Dut) -> None:
"""
@ -165,10 +162,6 @@ def test_examples_protocol_native_ota_example(dut: Dut) -> None:
@pytest.mark.esp32
@pytest.mark.esp32c3
@pytest.mark.esp32s2
@pytest.mark.esp32s3
@pytest.mark.esp32c2
@pytest.mark.ethernet_ota
def test_examples_protocol_native_ota_example_truncated_bin(dut: Dut) -> None:
"""
@ -219,10 +212,6 @@ def test_examples_protocol_native_ota_example_truncated_bin(dut: Dut) -> None:
@pytest.mark.esp32
@pytest.mark.esp32c3
@pytest.mark.esp32s2
@pytest.mark.esp32s3
@pytest.mark.esp32c2
@pytest.mark.ethernet_ota
def test_examples_protocol_native_ota_example_truncated_header(dut: Dut) -> None:
"""
@ -272,10 +261,6 @@ def test_examples_protocol_native_ota_example_truncated_header(dut: Dut) -> None
@pytest.mark.esp32
@pytest.mark.esp32c3
@pytest.mark.esp32s2
@pytest.mark.esp32s3
@pytest.mark.esp32c2
@pytest.mark.ethernet_ota
def test_examples_protocol_native_ota_example_random(dut: Dut) -> None:
"""
@ -325,10 +310,6 @@ def test_examples_protocol_native_ota_example_random(dut: Dut) -> None:
@pytest.mark.esp32
@pytest.mark.esp32c3
@pytest.mark.esp32s2
@pytest.mark.esp32s3
@pytest.mark.esp32c2
@pytest.mark.ethernet_ota
def test_examples_protocol_native_ota_example_chunked(dut: Dut) -> None:
"""

View File

@ -53,9 +53,6 @@ def start_https_server(ota_image_dir: str, server_ip: str, server_port: int) ->
@pytest.mark.esp32
@pytest.mark.esp32c3
@pytest.mark.esp32s2
@pytest.mark.esp32s3
@pytest.mark.ethernet_ota
def test_examples_protocol_pre_encrypted_ota_example(dut: Dut) -> None:
server_port = 8001

View File

@ -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: Unlicense OR CC0-1.0
import http.server
import multiprocessing
@ -10,7 +10,8 @@ from typing import Tuple
import pexpect
import pytest
from common_test_methods import get_env_config_variable, get_host_ip4_by_dest_ip
from common_test_methods import get_env_config_variable
from common_test_methods import get_host_ip4_by_dest_ip
from pytest_embedded import Dut
server_cert = '-----BEGIN CERTIFICATE-----\n' \
@ -124,7 +125,6 @@ def calc_all_sha256(dut: Dut) -> Tuple[str, str]:
@pytest.mark.esp32
@pytest.mark.esp32c3
@pytest.mark.esp32s2
@pytest.mark.esp32s3
@pytest.mark.wifi_high_traffic
def test_examples_protocol_simple_ota_example(dut: Dut) -> None:
@ -170,9 +170,6 @@ def test_examples_protocol_simple_ota_example(dut: Dut) -> None:
@pytest.mark.esp32
@pytest.mark.esp32c3
@pytest.mark.esp32s2
@pytest.mark.esp32s3
@pytest.mark.ethernet_ota
@pytest.mark.parametrize('config', ['spiram',], indirect=True)
def test_examples_protocol_simple_ota_example_ethernet_with_spiram_config(dut: Dut) -> None:
@ -258,9 +255,6 @@ def test_examples_protocol_simple_ota_example_with_flash_encryption_wifi(dut: Du
@pytest.mark.esp32
@pytest.mark.esp32c3
@pytest.mark.esp32s2
@pytest.mark.esp32s3
@pytest.mark.ethernet_ota
@pytest.mark.parametrize('config', ['on_update_no_sb_ecdsa',], indirect=True)
def test_examples_protocol_simple_ota_example_with_verify_app_signature_on_update_no_secure_boot_ecdsa(dut: Dut) -> None:
@ -301,9 +295,6 @@ def test_examples_protocol_simple_ota_example_with_verify_app_signature_on_updat
@pytest.mark.esp32
@pytest.mark.esp32c3
@pytest.mark.esp32s2
@pytest.mark.esp32s3
@pytest.mark.ethernet_ota
@pytest.mark.parametrize('config', ['on_update_no_sb_rsa',], indirect=True)
def test_examples_protocol_simple_ota_example_with_verify_app_signature_on_update_no_secure_boot_rsa(dut: Dut) -> None:

View File

@ -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: Unlicense OR CC0-1.0
"""
Test case for iperf example.
@ -7,24 +7,28 @@ This test case might have problem running on windows:
- use `sudo killall iperf` to force kill iperf, didn't implement windows version
The test env Example_ShieldBox_Basic do need the following config::
The test env wifi_iperf do need the following config::
Example_ShieldBox_Basic:
wifi_iperf:
ap_ssid: "myssid"
ap_password: "mypassword"
pc_nic: "eth1"
"""
import os
import time
from typing import Any, Callable, Tuple
from typing import Any
from typing import Callable
from typing import Tuple
import pexpect
import pytest
from common_test_methods import get_env_config_variable, get_host_ip_by_interface
from common_test_methods import get_env_config_variable
from common_test_methods import get_host_ip_by_interface
from idf_iperf_test_util import IperfUtility
from idf_iperf_test_util.IperfUtility import SCAN_RETRY_COUNT, SCAN_TIMEOUT, TEST_TIME
from idf_iperf_test_util.IperfUtility import SCAN_RETRY_COUNT
from idf_iperf_test_util.IperfUtility import SCAN_TIMEOUT
from idf_iperf_test_util.IperfUtility import TEST_TIME
from pytest_embedded import Dut
# configurations
@ -135,12 +139,9 @@ class IperfTestUtilitySoftap(IperfUtility.IperfTestUtility):
@pytest.mark.esp32
@pytest.mark.esp32s2
@pytest.mark.esp32c3
@pytest.mark.esp32s3
@pytest.mark.temp_skip_ci(targets=['esp32s2', 'esp32c3', 'esp32s3'], reason='lack of runners (run only for ESP32)')
@pytest.mark.timeout(1200)
@pytest.mark.Example_ShieldBox_Basic
@pytest.mark.wifi_iperf
@pytest.mark.parametrize('config', [
BEST_PERFORMANCE_CONFIG
], indirect=True)
@ -158,7 +159,7 @@ def test_wifi_throughput_basic(
dut.expect('iperf>')
# 2. preparing
env_name = 'Example_ShieldBox_Basic'
env_name = 'wifi_iperf'
pc_nic = get_env_config_variable(env_name, 'pc_nic')
pc_nic_ip = get_host_ip_by_interface(pc_nic)
pc_iperf_log_file = os.path.join(dut.logdir, 'pc_iperf_log.md')

View File

@ -34,21 +34,9 @@ no_runner_tags:
- esp32,ip101
- esp32,psram,quad_psram
- esp32,quad_psram
- esp32c2,ethernet,xtal_40mhz
- esp32c2,ethernet_ota,xtal_40mhz
- esp32c2,jtag,xtal_40mhz
- esp32c3,Example_ShieldBox_Basic
- esp32c3,ethernet_flash_8m
- esp32c3,ethernet_ota
- esp32c3,sdcard_sdmode
- esp32c6,jtag
- esp32h2,jtag
- esp32p4,jtag
- esp32s2,Example_ShieldBox_Basic
- esp32s2,ethernet_flash_8m
- esp32s2,ethernet_ota
- esp32s2,usb_host_flash_disk
- esp32s2,wifi_high_traffic
- esp32s3,Example_ShieldBox_Basic
- esp32s3,ethernet_flash_8m
- esp32s3,ethernet_ota

View File

@ -77,7 +77,7 @@ ENV_MARKERS = {
'wifi_router': 'both the runner and dut connect to the same wifi router',
'wifi_high_traffic': 'wifi high traffic runners',
'wifi_wlan': 'wifi runner with a wireless NIC',
'Example_ShieldBox_Basic': 'basic configuration of the AP and ESP DUT placed in shielded box',
'wifi_iperf': 'the AP and ESP dut were placed in a shielded box - for iperf test',
'Example_ShieldBox': 'multiple shielded APs connected to shielded ESP DUT via RF cable with programmable attenuator',
'xtal_26mhz': 'runner with 26MHz xtal on board',
'xtal_40mhz': 'runner with 40MHz xtal on board',