mirror of
https://github.com/espressif/esp-idf.git
synced 2026-04-27 19:13:21 +00:00
Merge branch 'ci/missing_config_pre_commit_hook_v5.5' into 'release/v5.5'
ci: add pre-commit hook to detect missing configs (v5.5) See merge request espressif/esp-idf!46206
This commit is contained in:
@@ -227,3 +227,8 @@ repos:
|
||||
hooks:
|
||||
- id: check-kconfig-files
|
||||
- id: check-deprecated-kconfig-options
|
||||
- repo: https://github.com/espressif/idf-ci
|
||||
rev: v1.0.0b4
|
||||
hooks:
|
||||
- id: check-tests-missing-config
|
||||
files: 'pytest_.*\.py$|sdkconfig(\..*)?$'
|
||||
|
||||
@@ -8,8 +8,6 @@ from pytest_embedded_idf.utils import idf_parametrize
|
||||
@idf_parametrize(
|
||||
'config,target,markers',
|
||||
[
|
||||
('default', 'esp32', (pytest.mark.generic,)),
|
||||
('default', 'esp32c2', (pytest.mark.generic,)),
|
||||
('iram', 'esp32c2', (pytest.mark.generic,)),
|
||||
('psram', 'esp32', (pytest.mark.psram,)),
|
||||
],
|
||||
|
||||
@@ -1,15 +0,0 @@
|
||||
# SPDX-FileCopyrightText: 2022-2025 Espressif Systems (Shanghai) CO LTD
|
||||
# SPDX-License-Identifier: CC0-1.0
|
||||
import pytest
|
||||
from pytest_embedded import Dut
|
||||
from pytest_embedded_idf.utils import idf_parametrize
|
||||
|
||||
|
||||
# SOC_PAU_SUPPORTED == 1
|
||||
retention_targets = ['esp32c6', 'esp32h2', 'esp32p4', 'esp32c5', 'esp32c61']
|
||||
|
||||
|
||||
@pytest.mark.generic
|
||||
@idf_parametrize('target', ['esp32c61', 'esp32c5', 'esp32p4', 'esp32h2', 'esp32c6'], indirect=['target'])
|
||||
def test_sleep_retention(dut: Dut) -> None:
|
||||
dut.run_all_single_board_cases()
|
||||
@@ -1,4 +1,4 @@
|
||||
# SPDX-FileCopyrightText: 2022-2025 Espressif Systems (Shanghai) CO LTD
|
||||
# SPDX-FileCopyrightText: 2022-2026 Espressif Systems (Shanghai) CO LTD
|
||||
# SPDX-License-Identifier: CC0-1.0
|
||||
import pytest
|
||||
from pytest_embedded import Dut
|
||||
@@ -19,16 +19,3 @@ from pytest_embedded_idf.utils import idf_parametrize
|
||||
@idf_parametrize('target', ['esp32', 'esp32c3'], indirect=['target'])
|
||||
def test_fatfs_flash_wl_generic(dut: Dut) -> None:
|
||||
dut.run_all_single_board_cases(timeout=240)
|
||||
|
||||
|
||||
@pytest.mark.generic
|
||||
@pytest.mark.psram
|
||||
@pytest.mark.parametrize(
|
||||
'config',
|
||||
[
|
||||
'psram',
|
||||
],
|
||||
)
|
||||
@idf_parametrize('target', ['esp32'], indirect=['target'])
|
||||
def test_fatfs_flash_wl_psram(dut: Dut) -> None:
|
||||
dut.run_all_single_board_cases(timeout=180)
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# SPDX-FileCopyrightText: 2022-2025 Espressif Systems (Shanghai) CO LTD
|
||||
# SPDX-FileCopyrightText: 2022-2026 Espressif Systems (Shanghai) CO LTD
|
||||
# SPDX-License-Identifier: CC0-1.0
|
||||
import pytest
|
||||
from pytest_embedded import Dut
|
||||
@@ -30,30 +30,3 @@ def test_fatfs_sdcard_generic_sdmmc(dut: Dut) -> None:
|
||||
@idf_parametrize('target', ['esp32', 'esp32c3'], indirect=['target'])
|
||||
def test_fatfs_sdcard_generic_sdspi(dut: Dut) -> None:
|
||||
dut.run_all_single_board_cases(group='sdspi', timeout=180)
|
||||
|
||||
|
||||
@pytest.mark.sdcard_sdmode
|
||||
@pytest.mark.psram
|
||||
@pytest.mark.parametrize(
|
||||
'config',
|
||||
[
|
||||
'psram',
|
||||
],
|
||||
)
|
||||
@idf_parametrize('target', ['esp32'], indirect=['target'])
|
||||
def test_fatfs_sdcard_psram_sdmmc(dut: Dut) -> None:
|
||||
dut.run_all_single_board_cases(group='sdmmc', timeout=180)
|
||||
|
||||
|
||||
@pytest.mark.temp_skip_ci(targets=['esp32'], reason='IDFCI-2058, temporary lack runner')
|
||||
@pytest.mark.sdcard_spimode
|
||||
@pytest.mark.psram
|
||||
@pytest.mark.parametrize(
|
||||
'config',
|
||||
[
|
||||
'psram',
|
||||
],
|
||||
)
|
||||
@idf_parametrize('target', ['esp32'], indirect=['target'])
|
||||
def test_fatfs_sdcard_psram_sdspi(dut: Dut) -> None:
|
||||
dut.run_all_single_board_cases(group='sdspi', timeout=180)
|
||||
|
||||
@@ -13,9 +13,6 @@ from pytest_embedded_idf.utils import idf_parametrize
|
||||
('freertos_options', 'supported_targets'),
|
||||
('tickless_idle', 'supported_targets'),
|
||||
('psram', 'esp32'),
|
||||
('psram', 'esp32c5'),
|
||||
('psram', 'esp32p4'),
|
||||
('psram', 'esp32s3'),
|
||||
('single_core', 'esp32'),
|
||||
('single_core', 'esp32p4'),
|
||||
(
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# SPDX-FileCopyrightText: 2024-2025 Espressif Systems (Shanghai) CO LTD
|
||||
# SPDX-FileCopyrightText: 2024-2026 Espressif Systems (Shanghai) CO LTD
|
||||
# SPDX-License-Identifier: CC0-1.0
|
||||
import binascii
|
||||
import os
|
||||
@@ -109,60 +109,6 @@ def test_ecdsa_key(
|
||||
raise
|
||||
|
||||
|
||||
@pytest.mark.generic
|
||||
@idf_parametrize('target', ['supported_targets'], indirect=['target'])
|
||||
def test_crypto(dut: Dut) -> None:
|
||||
# if the env variable IDF_FPGA_ENV is set, we would need a longer timeout
|
||||
# as tests for efuses burning security peripherals would be run
|
||||
timeout = 600 if os.environ.get('IDF_ENV_FPGA') else 60
|
||||
# only expect key manager result if it is supported for the SoC
|
||||
if dut.app.sdkconfig.get('SOC_KEY_MANAGER_SUPPORTED'):
|
||||
print('Key Manager is supported')
|
||||
|
||||
# Test for ECDH0 deployment XTS-AES-128 key
|
||||
dut.expect('Key Manager ECDH0 deployment: XTS_AES_128 key', timeout=timeout)
|
||||
k2_G = dut.expect(r'K2_G: 0x([0-9a-fA-F]+)', timeout=timeout)[1].decode()
|
||||
plaintext_data = dut.expect(r'Plaintext data: 0x([0-9a-fA-F]+)', timeout=timeout)[1]
|
||||
plaintext_data = binascii.unhexlify(plaintext_data)
|
||||
encrypted_data = dut.expect(r'Encrypted data: 0x([0-9a-fA-F]+)', timeout=timeout)[1].decode()
|
||||
encrypted_data = binascii.unhexlify(encrypted_data)
|
||||
negotiated_key = calculate_key_manager_ecdh0_negotiated_key(k2_G, 'main/key_manager/k1_ecdsa.pem')
|
||||
test_xts_aes_encryption(negotiated_key, plaintext_data, encrypted_data)
|
||||
|
||||
# Test for ECDH0 deployment XTS-AES-256 key
|
||||
dut.expect('Key Manager ECDH0 deployment: XTS_AES_256 key', timeout=timeout)
|
||||
k2_G_0 = dut.expect(r'K2_G_0: 0x([0-9a-fA-F]+)', timeout=timeout)[1].decode()
|
||||
k2_G_1 = dut.expect(r'K2_G_1: 0x([0-9a-fA-F]+)', timeout=timeout)[1].decode()
|
||||
encrypted_data = dut.expect(r'Encrypted data: 0x([0-9a-fA-F]+)', timeout=timeout)[1].decode()
|
||||
encrypted_data = binascii.unhexlify(encrypted_data)
|
||||
negotiated_key_0 = calculate_key_manager_ecdh0_negotiated_key(k2_G_0, 'main/key_manager/k1_ecdsa.pem')
|
||||
negotiated_key_1 = calculate_key_manager_ecdh0_negotiated_key(k2_G_1, 'main/key_manager/k1_ecdsa.pem')
|
||||
negotiated_key = negotiated_key_0 + negotiated_key_1
|
||||
test_xts_aes_encryption(negotiated_key, plaintext_data, encrypted_data)
|
||||
# Test for ECDH0 deployment ECDSA-256 key
|
||||
dut.expect('Key Manager ECDH0 deployment: ECDSA_256 key', timeout=timeout)
|
||||
k2_G = dut.expect(r'K2_G: 0x([0-9a-fA-F]+)', timeout=timeout)[1].decode()
|
||||
digest = dut.expect(r'ECDSA message sha256 digest: 0x([0-9a-fA-F]+)', timeout=timeout)[1].decode()
|
||||
digest = binascii.unhexlify(digest)
|
||||
signature_r_le = dut.expect(r'ECDSA signature r_le: 0x([0-9a-fA-F]+)', timeout=timeout)[1].decode()
|
||||
signature_r_le = binascii.unhexlify(signature_r_le)
|
||||
signature_s_le = dut.expect(r'ECDSA signature s_le: 0x([0-9a-fA-F]+)', timeout=timeout)[1].decode()
|
||||
signature_s_le = binascii.unhexlify(signature_s_le)
|
||||
pub_x = dut.expect(r'ECDSA key pubx: 0x([0-9a-fA-F]+)', timeout=timeout)[1].decode()
|
||||
pub_x = binascii.unhexlify(pub_x)
|
||||
pub_y = dut.expect(r'ECDSA key puby: 0x([0-9a-fA-F]+)', timeout=timeout)[1].decode()
|
||||
pub_y = binascii.unhexlify(pub_y)
|
||||
negotiated_key = calculate_key_manager_ecdh0_negotiated_key(k2_G, 'main/key_manager/k1_ecdsa.pem')
|
||||
test_ecdsa_key(negotiated_key, digest, signature_r_le, signature_s_le, pub_x, pub_y)
|
||||
|
||||
test_numbers = dut.expect(r'(\d+) Tests (\d+) Failures (\d+) Ignored', timeout=timeout)
|
||||
failures = test_numbers.group(2).decode()
|
||||
ignored = test_numbers.group(3).decode()
|
||||
assert failures == '0', f'No of failures must be 0 (is {failures})'
|
||||
assert ignored == '0', f'No of Ignored test must be 0 (is {ignored})'
|
||||
dut.expect('Tests finished', timeout=timeout)
|
||||
|
||||
|
||||
@pytest.mark.generic
|
||||
@pytest.mark.parametrize('config', ['long_aes_operations'], indirect=True)
|
||||
@idf_parametrize('target', ['supported_targets'], indirect=['target'])
|
||||
|
||||
@@ -1,11 +0,0 @@
|
||||
# SPDX-FileCopyrightText: 2022-2025 Espressif Systems (Shanghai) CO LTD
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
import pytest
|
||||
from pytest_embedded import Dut
|
||||
from pytest_embedded_idf.utils import idf_parametrize
|
||||
|
||||
|
||||
@pytest.mark.generic
|
||||
@idf_parametrize('target', ['esp32'], indirect=['target'])
|
||||
def test_lwip(dut: Dut) -> None:
|
||||
dut.expect_unity_test_output()
|
||||
@@ -1,11 +0,0 @@
|
||||
# SPDX-FileCopyrightText: 2023-2025 Espressif Systems (Shanghai) CO LTD
|
||||
# SPDX-License-Identifier: Unlicense OR CC0-1.0
|
||||
import pytest
|
||||
from pytest_embedded import Dut
|
||||
from pytest_embedded_idf.utils import idf_parametrize
|
||||
|
||||
|
||||
@pytest.mark.host_test
|
||||
@idf_parametrize('target', ['linux'], indirect=['target'])
|
||||
def test_nvs_host_linux(dut: Dut) -> None:
|
||||
dut.expect_exact('All tests passed', timeout=60)
|
||||
@@ -1,6 +1,6 @@
|
||||
components/spiffs/test_apps:
|
||||
disable_test:
|
||||
- if: IDF_TARGET not in ["esp32", "esp32c3", "esp32s3"]
|
||||
- if: IDF_TARGET not in ["esp32", "esp32c3"]
|
||||
reason: These chips should be sufficient for test coverage (Xtensa and RISC-V, single and dual core)
|
||||
|
||||
depends_components:
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# SPDX-FileCopyrightText: 2022-2025 Espressif Systems (Shanghai) CO LTD
|
||||
# SPDX-FileCopyrightText: 2022-2026 Espressif Systems (Shanghai) CO LTD
|
||||
# SPDX-License-Identifier: CC0-1.0
|
||||
import pytest
|
||||
from pytest_embedded import Dut
|
||||
@@ -17,16 +17,3 @@ from pytest_embedded_idf.utils import idf_parametrize
|
||||
@idf_parametrize('target', ['esp32', 'esp32c3'], indirect=['target'])
|
||||
def test_spiffs_generic(dut: Dut) -> None:
|
||||
dut.run_all_single_board_cases(timeout=120)
|
||||
|
||||
|
||||
@pytest.mark.quad_psram
|
||||
@pytest.mark.parametrize(
|
||||
'config',
|
||||
[
|
||||
'psram',
|
||||
],
|
||||
indirect=True,
|
||||
)
|
||||
@idf_parametrize('target', ['esp32s3'], indirect=['target'])
|
||||
def test_spiffs_psram(dut: Dut) -> None:
|
||||
dut.run_all_single_board_cases(timeout=120)
|
||||
|
||||
@@ -5,7 +5,7 @@ components/vfs/test_apps:
|
||||
reason: not support yet # TODO: [esp32h21] IDF-11593 [ESP32H4] IDF-12372
|
||||
|
||||
disable_test:
|
||||
- if: IDF_TARGET not in ["esp32", "esp32c2", "esp32c3", "esp32c6", "esp32h2", "esp32s3"]
|
||||
- if: IDF_TARGET not in ["esp32c2", "esp32c3", "esp32c6", "esp32h2"]
|
||||
temporary: true
|
||||
reason: lack of runners
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# SPDX-FileCopyrightText: 2023-2025 Espressif Systems (Shanghai) CO LTD
|
||||
# SPDX-FileCopyrightText: 2023-2026 Espressif Systems (Shanghai) CO LTD
|
||||
# SPDX-License-Identifier: CC0-1.0
|
||||
import pytest
|
||||
from pytest_embedded import Dut
|
||||
@@ -17,29 +17,3 @@ from pytest_embedded_idf.utils import idf_parametrize
|
||||
@idf_parametrize('target', ['esp32c2', 'esp32c3', 'esp32c6', 'esp32h2'], indirect=['target'])
|
||||
def test_vfs_default(dut: Dut) -> None:
|
||||
dut.run_all_single_board_cases()
|
||||
|
||||
|
||||
@pytest.mark.generic
|
||||
@pytest.mark.parametrize(
|
||||
'config',
|
||||
[
|
||||
'ccomp',
|
||||
],
|
||||
indirect=True,
|
||||
)
|
||||
@idf_parametrize('target', ['esp32'], indirect=['target'])
|
||||
def test_vfs_ccomp(dut: Dut) -> None:
|
||||
dut.run_all_single_board_cases()
|
||||
|
||||
|
||||
@pytest.mark.quad_psram
|
||||
@pytest.mark.parametrize(
|
||||
'config',
|
||||
[
|
||||
'psram',
|
||||
],
|
||||
indirect=True,
|
||||
)
|
||||
@idf_parametrize('target', ['esp32s3'], indirect=['target'])
|
||||
def test_vfs_psram(dut: Dut) -> None:
|
||||
dut.run_all_single_board_cases()
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#!/usr/bin/env python
|
||||
#
|
||||
# SPDX-FileCopyrightText: 2018-2025 Espressif Systems (Shanghai) CO LTD
|
||||
# SPDX-FileCopyrightText: 2018-2026 Espressif Systems (Shanghai) CO LTD
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
import logging
|
||||
import os
|
||||
@@ -102,10 +102,3 @@ def test_wifi_prov_mgr(dut: Dut, sec_ver: int) -> None:
|
||||
@idf_parametrize('target', ['esp32'], indirect=['target'])
|
||||
def test_examples_wifi_prov_mgr_sec1(dut: Dut) -> None:
|
||||
test_wifi_prov_mgr(dut, 1)
|
||||
|
||||
|
||||
@pytest.mark.generic
|
||||
@pytest.mark.xfail(reason='Runner unable to connect to target over Bluetooth', run=False)
|
||||
@idf_parametrize('target', ['esp32'], indirect=['target'])
|
||||
def test_examples_wifi_prov_mgr_sec2(dut: Dut) -> None:
|
||||
test_wifi_prov_mgr(dut, 2)
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# SPDX-FileCopyrightText: 2022-2025 Espressif Systems (Shanghai) CO LTD
|
||||
# SPDX-FileCopyrightText: 2022-2026 Espressif Systems (Shanghai) CO LTD
|
||||
# SPDX-License-Identifier: Unlicense OR CC0-1.0
|
||||
import logging
|
||||
import os
|
||||
@@ -6,7 +6,6 @@ import os
|
||||
import pytest
|
||||
from pytest_embedded import Dut
|
||||
from pytest_embedded_idf.utils import idf_parametrize
|
||||
from pytest_embedded_idf.utils import soc_filtered_targets
|
||||
from pytest_embedded_qemu.dut import QemuDut
|
||||
|
||||
|
||||
@@ -664,14 +663,6 @@ def test_examples_efuse_with_virt_secure_boot_v2_esp32xx(dut: Dut) -> None:
|
||||
example_efuse_with_virt_secure_boot_v2_esp32xx(dut)
|
||||
|
||||
|
||||
@pytest.mark.generic
|
||||
@pytest.mark.parametrize('config', ['virt_secure_boot_v2_ecdsa_p384'], indirect=True)
|
||||
@pytest.mark.parametrize('skip_autoflash', ['y'], indirect=True)
|
||||
@idf_parametrize('target', soc_filtered_targets('SOC_ECDSA_SUPPORT_CURVE_P384 == 1'), indirect=['target'])
|
||||
def test_examples_efuse_with_virt_secure_boot_v2_ecdsa_p384_esp32xx(dut: Dut) -> None:
|
||||
example_efuse_with_virt_secure_boot_v2_esp32xx(dut)
|
||||
|
||||
|
||||
@pytest.mark.generic
|
||||
@pytest.mark.parametrize('config', ['virt_secure_boot_v2'], indirect=True)
|
||||
@pytest.mark.parametrize('skip_autoflash', ['y'], indirect=True)
|
||||
@@ -1102,11 +1093,3 @@ def example_efuse_with_virt_sb_v2_and_fe(dut: Dut) -> None:
|
||||
)
|
||||
def test_examples_efuse_with_virt_sb_v2_and_fe_esp32xx(dut: Dut) -> None:
|
||||
example_efuse_with_virt_sb_v2_and_fe(dut)
|
||||
|
||||
|
||||
@pytest.mark.generic
|
||||
@pytest.mark.parametrize('skip_autoflash', ['y'], indirect=True)
|
||||
@pytest.mark.parametrize('config', ['virt_sb_v2_ecdsa_p384_and_fe'], indirect=True)
|
||||
@idf_parametrize('target', soc_filtered_targets('SOC_ECDSA_SUPPORT_CURVE_P384 == 1'), indirect=['target'])
|
||||
def test_examples_efuse_with_virt_sb_v2_ecdsa_p384_and_fe_esp32xx(dut: Dut) -> None:
|
||||
example_efuse_with_virt_sb_v2_and_fe(dut)
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
# SPDX-FileCopyrightText: 2024-2025 Espressif Systems (Shanghai) CO LTD
|
||||
# SPDX-FileCopyrightText: 2024-2026 Espressif Systems (Shanghai) CO LTD
|
||||
# SPDX-License-Identifier: Unlicense OR CC0-1.0
|
||||
import http.server
|
||||
import itertools
|
||||
import multiprocessing
|
||||
import os
|
||||
import ssl
|
||||
@@ -77,16 +78,19 @@ server_key = (
|
||||
'-----END PRIVATE KEY-----\n'
|
||||
)
|
||||
|
||||
CONFIG_PARTITIONS_OTA = [
|
||||
('on_update_no_sb_ecdsa', 'esp32'),
|
||||
*itertools.product(
|
||||
['on_update_no_sb_rsa', 'virt_sb_v2_and_fe', 'virt_sb_v2_and_fe_2'],
|
||||
['esp32', 'esp32c3', 'esp32s3'],
|
||||
),
|
||||
]
|
||||
|
||||
|
||||
@pytest.mark.wifi_high_traffic
|
||||
@pytest.mark.parametrize(
|
||||
'config',
|
||||
['on_update_no_sb_ecdsa', 'on_update_no_sb_rsa', 'virt_sb_v2_and_fe', 'virt_sb_v2_and_fe_2'],
|
||||
indirect=True,
|
||||
)
|
||||
@pytest.mark.parametrize('skip_autoflash', ['y'], indirect=True)
|
||||
@pytest.mark.timeout(2400)
|
||||
@idf_parametrize('target', ['esp32', 'esp32c3', 'esp32s3'], indirect=['target'])
|
||||
@idf_parametrize('config, target', CONFIG_PARTITIONS_OTA, indirect=['config', 'target'])
|
||||
def test_examples_partitions_ota(dut: Dut) -> None:
|
||||
print(' - Erase flash')
|
||||
dut.serial.erase_flash()
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# SPDX-FileCopyrightText: 2022-2025 Espressif Systems (Shanghai) CO LTD
|
||||
# SPDX-FileCopyrightText: 2022-2026 Espressif Systems (Shanghai) CO LTD
|
||||
# SPDX-License-Identifier: CC0-1.0
|
||||
import os.path
|
||||
from typing import Tuple
|
||||
@@ -111,33 +111,3 @@ def test_wifi_getting_started_esp32c2eco4_xtal_26mhz(dut: Tuple[IdfDut, IdfDut])
|
||||
station.expect(f'{tag}: got ip:', timeout=60)
|
||||
station.expect(f'{tag}: connected to ap SSID:{ssid} password:{password}', timeout=60)
|
||||
softap.expect('station .+ join, AID=', timeout=60)
|
||||
|
||||
|
||||
@pytest.mark.two_duts
|
||||
@pytest.mark.esp32c3eco7
|
||||
@pytest.mark.parametrize(
|
||||
'count, config, app_path',
|
||||
[
|
||||
(
|
||||
2,
|
||||
'esp32c3eco7',
|
||||
f'{os.path.join(os.path.dirname(__file__), "softAP")}|{os.path.join(os.path.dirname(__file__), "station")}',
|
||||
),
|
||||
],
|
||||
indirect=True,
|
||||
)
|
||||
@idf_parametrize('target', ['esp32c3'], indirect=['target'])
|
||||
def test_wifi_getting_started_esp32c3eco7(dut: Tuple[IdfDut, IdfDut]) -> None:
|
||||
softap = dut[0]
|
||||
station = dut[1]
|
||||
|
||||
assert station.app.sdkconfig['ESP_WIFI_SOFTAP_SUPPORT'] is False
|
||||
ssid = softap.app.sdkconfig.get('ESP_WIFI_SSID')
|
||||
password = softap.app.sdkconfig.get('ESP_WIFI_PASSWORD')
|
||||
assert station.app.sdkconfig.get('ESP_WIFI_SSID') == ssid
|
||||
assert station.app.sdkconfig.get('ESP_WIFI_PASSWORD') == password
|
||||
|
||||
tag = 'wifi station'
|
||||
station.expect(f'{tag}: got ip:', timeout=60)
|
||||
station.expect(f'{tag}: connected to ap SSID:{ssid} password:{password}', timeout=60)
|
||||
softap.expect('station .+ join, AID=', timeout=60)
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
# SPDX-FileCopyrightText: 2023-2025 Espressif Systems (Shanghai) CO LTD
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
import typing as t
|
||||
|
||||
"""
|
||||
Pytest Related Constants. Don't import third-party packages here.
|
||||
"""
|
||||
@@ -16,7 +18,7 @@ SUPPORTED_TARGETS = [
|
||||
'esp32c5',
|
||||
'esp32c61',
|
||||
]
|
||||
PREVIEW_TARGETS: list[str] = [] # this PREVIEW_TARGETS excludes 'linux' target
|
||||
PREVIEW_TARGETS: t.List[str] = [] # this PREVIEW_TARGETS excludes 'linux' target
|
||||
|
||||
DEFAULT_LOGDIR = 'pytest-embedded'
|
||||
|
||||
|
||||
@@ -49,8 +49,8 @@ def requires_elf_or_map(case: PytestCase) -> bool:
|
||||
return False
|
||||
|
||||
|
||||
def skipped_targets(item: Function) -> set[str]:
|
||||
def _get_temp_markers_disabled_targets(marker_name: str) -> set[str]:
|
||||
def skipped_targets(item: Function) -> t.Set[str]:
|
||||
def _get_temp_markers_disabled_targets(marker_name: str) -> t.Set[str]:
|
||||
targets = []
|
||||
for _m in item.own_markers:
|
||||
if _m.name == marker_name:
|
||||
@@ -115,7 +115,7 @@ class IdfLocalPlugin:
|
||||
return item.callspec.params.get(key, default) or default
|
||||
|
||||
@pytest.hookimpl(wrapper=True)
|
||||
def pytest_collection_modifyitems(self, config: Config, items: list[Function]) -> t.Generator[None, None, None]:
|
||||
def pytest_collection_modifyitems(self, config: Config, items: t.List[Function]) -> t.Generator[None, None, None]:
|
||||
yield # throw it back to idf-ci
|
||||
|
||||
deselected_items = []
|
||||
|
||||
-1
@@ -6,7 +6,6 @@ from pytest_embedded_idf.utils import idf_parametrize
|
||||
|
||||
|
||||
@pytest.mark.generic
|
||||
@idf_parametrize('config', ['app_in_flash'], indirect=['config'])
|
||||
@idf_parametrize('target', ['esp32p4'], indirect=['target'])
|
||||
def test_ld_non_contiguous_memory(dut: Dut) -> None:
|
||||
dut.expect_exact('buf2 placed in low sram')
|
||||
|
||||
@@ -10,6 +10,6 @@ tools/test_apps/security/secure_boot:
|
||||
|
||||
tools/test_apps/security/signed_app_no_secure_boot:
|
||||
enable:
|
||||
- if: IDF_TARGET in ["esp32c2", "esp32c3"]
|
||||
- if: IDF_TARGET in ["esp32c3"]
|
||||
temporary: true
|
||||
reason: No need to test on all targets
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
| Supported Targets | ESP32-C2 | ESP32-C3 |
|
||||
| ----------------- | -------- | -------- |
|
||||
| Supported Targets | ESP32-C3 |
|
||||
| ----------------- | -------- |
|
||||
|
||||
# Secure Signed On Update No Secure Boot
|
||||
|
||||
|
||||
+1
-10
@@ -1,4 +1,4 @@
|
||||
# SPDX-FileCopyrightText: 2023-2025 Espressif Systems (Shanghai) CO LTD
|
||||
# SPDX-FileCopyrightText: 2023-2026 Espressif Systems (Shanghai) CO LTD
|
||||
# SPDX-License-Identifier: Unlicense OR CC0-1.0
|
||||
|
||||
import pytest
|
||||
@@ -6,15 +6,6 @@ from pytest_embedded import Dut
|
||||
from pytest_embedded_idf.utils import idf_parametrize
|
||||
|
||||
|
||||
@pytest.mark.generic
|
||||
@idf_parametrize('target', ['esp32c2', 'esp32c3'], indirect=['target'])
|
||||
def test_examples_security_on_update_no_secure_boot(dut: Dut) -> None:
|
||||
dut.expect(
|
||||
"This app is not signed, but check signature on update is enabled in config. It won't be possible to verify any update.", # noqa : E501
|
||||
timeout=10,
|
||||
)
|
||||
|
||||
|
||||
@pytest.mark.host_test
|
||||
@pytest.mark.qemu
|
||||
@pytest.mark.parametrize('config', ['secure_update_with_fe'], indirect=True)
|
||||
|
||||
@@ -64,12 +64,6 @@ CONFIG_PANIC = list(itertools.chain(itertools.product(['panic'], ['supported_tar
|
||||
CONFIG_PANIC_DUAL_CORE = list(itertools.chain(itertools.product(['panic'], TARGETS_DUAL_CORE)))
|
||||
CONFIG_PANIC_HALT = list(itertools.chain(itertools.product(['panic_halt'], TARGETS_ALL)))
|
||||
|
||||
CONFIGS_BACKTRACE = list(
|
||||
itertools.chain(
|
||||
# One single-core target and one dual-core target is enough
|
||||
itertools.product(['framepointer'], ['esp32c3', 'esp32p4'])
|
||||
)
|
||||
)
|
||||
|
||||
CONFIGS_DUAL_CORE = list(
|
||||
itertools.chain(
|
||||
@@ -708,7 +702,7 @@ def test_panic_handler_crash1(dut: PanicTestDut, config: str, test_func_name: st
|
||||
# currently ESP32-S2, ESP32-C3, ESP32-C2, ESP32-H2, ESP32-C6, ESP32-P4, ESP32-C5 and ESP32-C61 are supported
|
||||
CONFIGS_MEMPROT_IDRAM = list(
|
||||
itertools.chain(
|
||||
itertools.product(
|
||||
zip(
|
||||
[
|
||||
'memprot_esp32s2',
|
||||
'memprot_esp32c3',
|
||||
@@ -727,7 +721,7 @@ CONFIGS_MEMPROT_DCACHE = list(itertools.chain(itertools.product(['memprot_esp32s
|
||||
|
||||
CONFIGS_MEMPROT_RTC_FAST_MEM = list(
|
||||
itertools.chain(
|
||||
itertools.product(
|
||||
zip(
|
||||
[
|
||||
'memprot_esp32s2',
|
||||
'memprot_esp32c3',
|
||||
@@ -746,7 +740,7 @@ CONFIGS_MEMPROT_RTC_SLOW_MEM = list(itertools.chain(itertools.product(['memprot_
|
||||
|
||||
CONFIGS_MEMPROT_FLASH_IDROM = list(
|
||||
itertools.chain(
|
||||
itertools.product(
|
||||
zip(
|
||||
['memprot_esp32c5', 'memprot_esp32c6', 'memprot_esp32c61', 'memprot_esp32h2', 'memprot_esp32p4'],
|
||||
['esp32c5', 'esp32c6', 'esp32c61', 'esp32h2', 'esp32p4'],
|
||||
)
|
||||
@@ -755,7 +749,7 @@ CONFIGS_MEMPROT_FLASH_IDROM = list(
|
||||
|
||||
CONFIGS_MEMPROT_SPIRAM_XIP_IROM_ALIGNMENT_HEAP = list(
|
||||
itertools.chain(
|
||||
itertools.product(
|
||||
zip(
|
||||
['memprot_spiram_xip_esp32c5', 'memprot_spiram_xip_esp32c61', 'memprot_spiram_xip_esp32p4'],
|
||||
['esp32c5', 'esp32c61', 'esp32p4'],
|
||||
)
|
||||
@@ -764,7 +758,7 @@ CONFIGS_MEMPROT_SPIRAM_XIP_IROM_ALIGNMENT_HEAP = list(
|
||||
|
||||
CONFIGS_MEMPROT_SPIRAM_XIP_DROM_ALIGNMENT_HEAP = list(
|
||||
itertools.chain(
|
||||
itertools.product(
|
||||
zip(
|
||||
[
|
||||
'memprot_spiram_xip_esp32s3',
|
||||
'memprot_spiram_xip_esp32c5',
|
||||
@@ -778,7 +772,7 @@ CONFIGS_MEMPROT_SPIRAM_XIP_DROM_ALIGNMENT_HEAP = list(
|
||||
|
||||
CONFIGS_MEMPROT_INVALID_REGION_PROTECTION_USING_PMA = list(
|
||||
itertools.chain(
|
||||
itertools.product(
|
||||
zip(
|
||||
['memprot_esp32c5', 'memprot_esp32c6', 'memprot_esp32c61', 'memprot_esp32h2', 'memprot_esp32p4'],
|
||||
['esp32c5', 'esp32c6', 'esp32c61', 'esp32h2', 'esp32p4'],
|
||||
)
|
||||
@@ -1284,21 +1278,6 @@ def test_tcb_corrupted(dut: PanicTestDut, target: str, config: str, test_func_na
|
||||
common_test(dut, config, expected_backtrace=None, expected_coredump=coredump_pattern)
|
||||
|
||||
|
||||
@pytest.mark.generic
|
||||
@idf_parametrize('config, target', CONFIGS_BACKTRACE, indirect=['config', 'target'])
|
||||
@pytest.mark.temp_skip_ci(targets=['esp32p4'], reason='p4 rev3 migration, IDF-14348')
|
||||
def test_panic_print_backtrace(dut: PanicTestDut, config: str, test_func_name: str) -> None:
|
||||
dut.run_test_func(test_func_name)
|
||||
regex_pattern = rb'abort\(\) was called at PC [0-9xa-f]+ on core 0'
|
||||
dut.expect(regex_pattern)
|
||||
dut.expect_backtrace()
|
||||
dut.expect_elf_sha256()
|
||||
dut.expect_none(['Guru Meditation', 'Re-entered core dump'])
|
||||
|
||||
coredump_pattern = re.compile(PANIC_ABORT_PREFIX + regex_pattern.decode('utf-8'))
|
||||
common_test(dut, config, expected_backtrace=None, expected_coredump=[coredump_pattern])
|
||||
|
||||
|
||||
@pytest.mark.generic
|
||||
@idf_parametrize('config, target', CONFIG_PANIC_HALT, indirect=['config', 'target'])
|
||||
@pytest.mark.temp_skip_ci(targets=['esp32p4'], reason='p4 rev3 migration, IDF-14348')
|
||||
|
||||
Reference in New Issue
Block a user