mirror of
https://github.com/espressif/esp-idf.git
synced 2026-09-22 13:01:16 +03:00
feat(uhci): add flash encryption test on encrypted runners
This commit is contained in:
@@ -6,6 +6,13 @@ from pytest_embedded_idf.utils import idf_parametrize
|
||||
from pytest_embedded_idf.utils import soc_filtered_targets
|
||||
|
||||
|
||||
def get_flash_encryption_marks(target: str) -> tuple[pytest.MarkDecorator, ...]:
|
||||
if target == 'esp32s3':
|
||||
return (pytest.mark.flash_encryption_f4r8,)
|
||||
|
||||
return (pytest.mark.flash_encryption,)
|
||||
|
||||
|
||||
@pytest.mark.generic
|
||||
@pytest.mark.parametrize(
|
||||
'config',
|
||||
@@ -63,36 +70,15 @@ def test_dma_weighted_arbitration(dut: Dut) -> None:
|
||||
dut.run_all_single_board_cases()
|
||||
|
||||
|
||||
@pytest.mark.flash_encryption
|
||||
@pytest.mark.parametrize(
|
||||
'config',
|
||||
'config, target',
|
||||
[
|
||||
'flash_enc',
|
||||
pytest.param('flash_enc', target, marks=get_flash_encryption_marks(target))
|
||||
for target in soc_filtered_targets(
|
||||
'SOC_GDMA_SUPPORTED == 1 and SOC_PSRAM_DMA_CAPABLE == 1 and SOC_FLASH_ENC_SUPPORTED == 1'
|
||||
)
|
||||
],
|
||||
indirect=True,
|
||||
)
|
||||
@idf_parametrize(
|
||||
'target',
|
||||
soc_filtered_targets(
|
||||
'SOC_GDMA_SUPPORTED == 1 and '
|
||||
'SOC_PSRAM_DMA_CAPABLE == 1 and '
|
||||
'SOC_FLASH_ENC_SUPPORTED == 1 and '
|
||||
'IDF_TARGET not in ["esp32s3"]'
|
||||
),
|
||||
indirect=['target'],
|
||||
)
|
||||
def test_dma_flash_encryption(dut: Dut) -> None:
|
||||
dut.run_all_single_board_cases()
|
||||
|
||||
|
||||
@pytest.mark.flash_encryption_f4r8
|
||||
@pytest.mark.parametrize(
|
||||
'config',
|
||||
[
|
||||
'flash_enc',
|
||||
],
|
||||
indirect=True,
|
||||
)
|
||||
@idf_parametrize('target', ['esp32s3'], indirect=['target'])
|
||||
def test_dma_flash_encryption_s3_f4r8(dut: Dut) -> None:
|
||||
dut.run_all_single_board_cases()
|
||||
|
||||
@@ -6,6 +6,13 @@ from pytest_embedded_idf.utils import idf_parametrize
|
||||
from pytest_embedded_idf.utils import soc_filtered_targets
|
||||
|
||||
|
||||
def get_flash_encryption_marks(target: str) -> tuple[pytest.MarkDecorator, ...]:
|
||||
if target == 'esp32s3':
|
||||
return (pytest.mark.flash_encryption_f4r8,)
|
||||
|
||||
return (pytest.mark.flash_encryption,)
|
||||
|
||||
|
||||
@pytest.mark.generic
|
||||
@pytest.mark.parametrize(
|
||||
'config',
|
||||
@@ -78,36 +85,15 @@ def test_i2s_psram(dut: Dut) -> None:
|
||||
dut.run_all_single_board_cases()
|
||||
|
||||
|
||||
@pytest.mark.flash_encryption_f4r8
|
||||
@pytest.mark.parametrize(
|
||||
'config',
|
||||
'config, target',
|
||||
[
|
||||
'flash_enc',
|
||||
pytest.param('flash_enc', target, marks=get_flash_encryption_marks(target))
|
||||
for target in soc_filtered_targets(
|
||||
'SOC_I2S_SUPPORTED == 1 and SOC_PSRAM_DMA_CAPABLE == 1 and SOC_FLASH_ENC_SUPPORTED == 1'
|
||||
)
|
||||
],
|
||||
indirect=True,
|
||||
)
|
||||
@idf_parametrize('target', ['esp32s3'], indirect=['target'])
|
||||
def test_i2s_with_flash_encryption_esp32s3_f4r8(dut: Dut) -> None:
|
||||
dut.run_all_single_board_cases()
|
||||
|
||||
|
||||
@pytest.mark.flash_encryption
|
||||
@pytest.mark.parametrize(
|
||||
'config',
|
||||
[
|
||||
'flash_enc',
|
||||
],
|
||||
indirect=True,
|
||||
)
|
||||
@idf_parametrize(
|
||||
'target',
|
||||
soc_filtered_targets(
|
||||
'SOC_I2S_SUPPORTED == 1 and '
|
||||
'SOC_PSRAM_DMA_CAPABLE == 1 and '
|
||||
'SOC_FLASH_ENC_SUPPORTED == 1 and '
|
||||
'IDF_TARGET not in ["esp32s3"]'
|
||||
),
|
||||
indirect=['target'],
|
||||
)
|
||||
def test_i2s_with_flash_encryption(dut: Dut) -> None:
|
||||
dut.run_all_single_board_cases()
|
||||
|
||||
@@ -6,6 +6,13 @@ from pytest_embedded_idf.utils import idf_parametrize
|
||||
from pytest_embedded_idf.utils import soc_filtered_targets
|
||||
|
||||
|
||||
def get_flash_encryption_marks(target: str) -> tuple[pytest.MarkDecorator, ...]:
|
||||
if target == 'esp32s3':
|
||||
return (pytest.mark.flash_encryption_f4r8,)
|
||||
|
||||
return (pytest.mark.flash_encryption,)
|
||||
|
||||
|
||||
@pytest.mark.generic
|
||||
@pytest.mark.parametrize(
|
||||
'config',
|
||||
@@ -65,31 +72,13 @@ def test_rmt_psram(dut: Dut) -> None:
|
||||
dut.run_all_single_board_cases()
|
||||
|
||||
|
||||
@pytest.mark.flash_encryption_f4r8
|
||||
@pytest.mark.parametrize(
|
||||
'config',
|
||||
'config, target',
|
||||
[
|
||||
'flash_enc',
|
||||
pytest.param('flash_enc', target, marks=get_flash_encryption_marks(target))
|
||||
for target in soc_filtered_targets('SOC_RMT_SUPPORT_DMA == 1 and SOC_FLASH_ENC_SUPPORTED == 1')
|
||||
],
|
||||
indirect=True,
|
||||
)
|
||||
@idf_parametrize('target', ['esp32s3'], indirect=['target'])
|
||||
def test_rmt_with_flash_encryption_esp32s3_f4r8(dut: Dut) -> None:
|
||||
dut.run_all_single_board_cases()
|
||||
|
||||
|
||||
@pytest.mark.flash_encryption
|
||||
@pytest.mark.parametrize(
|
||||
'config',
|
||||
[
|
||||
'flash_enc',
|
||||
],
|
||||
indirect=True,
|
||||
)
|
||||
@idf_parametrize(
|
||||
'target',
|
||||
soc_filtered_targets('SOC_RMT_SUPPORT_DMA == 1 and SOC_FLASH_ENC_SUPPORTED == 1 and IDF_TARGET not in ["esp32s3"]'),
|
||||
indirect=['target'],
|
||||
)
|
||||
def test_rmt_with_flash_encryption(dut: Dut) -> None:
|
||||
dut.run_all_single_board_cases()
|
||||
|
||||
@@ -3,6 +3,14 @@
|
||||
import pytest
|
||||
from pytest_embedded import Dut
|
||||
from pytest_embedded_idf.utils import idf_parametrize
|
||||
from pytest_embedded_idf.utils import soc_filtered_targets
|
||||
|
||||
|
||||
def get_flash_encryption_marks(target: str) -> tuple[pytest.MarkDecorator, ...]:
|
||||
if target == 'esp32s3':
|
||||
return (pytest.mark.flash_encryption_f4r8,)
|
||||
|
||||
return (pytest.mark.flash_encryption,)
|
||||
|
||||
|
||||
@pytest.mark.generic
|
||||
@@ -33,3 +41,17 @@ def test_uhci(dut: Dut) -> None:
|
||||
@idf_parametrize('target', ['esp32s3'], indirect=['target'])
|
||||
def test_uhci_psram_s3(dut: Dut) -> None:
|
||||
dut.run_all_single_board_cases()
|
||||
|
||||
|
||||
@pytest.mark.parametrize(
|
||||
'config, target',
|
||||
[
|
||||
pytest.param('flash_enc', target, marks=get_flash_encryption_marks(target))
|
||||
for target in soc_filtered_targets(
|
||||
'SOC_UHCI_SUPPORTED == 1 and SOC_PSRAM_DMA_CAPABLE == 1 and SOC_FLASH_ENC_SUPPORTED == 1'
|
||||
)
|
||||
],
|
||||
indirect=True,
|
||||
)
|
||||
def test_uhci_flash_encryption(dut: Dut) -> None:
|
||||
dut.run_all_single_board_cases()
|
||||
|
||||
@@ -0,0 +1,9 @@
|
||||
CONFIG_PARTITION_TABLE_OFFSET=0x9000
|
||||
CONFIG_SECURE_FLASH_ENC_ENABLED=y
|
||||
CONFIG_SECURE_FLASH_ENCRYPTION_MODE_DEVELOPMENT=y
|
||||
CONFIG_SECURE_BOOT_ALLOW_ROM_BASIC=y
|
||||
CONFIG_SECURE_BOOT_ALLOW_JTAG=y
|
||||
CONFIG_SECURE_FLASH_UART_BOOTLOADER_ALLOW_ENC=y
|
||||
CONFIG_SECURE_FLASH_UART_BOOTLOADER_ALLOW_DEC=y
|
||||
CONFIG_SECURE_FLASH_UART_BOOTLOADER_ALLOW_CACHE=y
|
||||
CONFIG_SECURE_FLASH_REQUIRE_ALREADY_ENABLED=y
|
||||
@@ -1,3 +1,2 @@
|
||||
CONFIG_SPIRAM=y
|
||||
CONFIG_SPIRAM_SPEED_80M=y
|
||||
CONFIG_SPIRAM_MALLOC_ALWAYSINTERNAL=0
|
||||
|
||||
@@ -0,0 +1,2 @@
|
||||
CONFIG_SPIRAM=y
|
||||
CONFIG_SPIRAM_MALLOC_ALWAYSINTERNAL=0
|
||||
@@ -0,0 +1,2 @@
|
||||
CONFIG_SPIRAM=y
|
||||
CONFIG_SPIRAM_MALLOC_ALWAYSINTERNAL=0
|
||||
@@ -0,0 +1,3 @@
|
||||
CONFIG_SPIRAM=y
|
||||
CONFIG_SPIRAM_MODE_HEX=y
|
||||
CONFIG_SPIRAM_MALLOC_ALWAYSINTERNAL=0
|
||||
@@ -0,0 +1,2 @@
|
||||
CONFIG_SPIRAM=y
|
||||
CONFIG_SPIRAM_MALLOC_ALWAYSINTERNAL=0
|
||||
@@ -6,6 +6,13 @@ from pytest_embedded_idf.utils import idf_parametrize
|
||||
from pytest_embedded_idf.utils import soc_filtered_targets
|
||||
|
||||
|
||||
def get_flash_encryption_marks(target: str) -> tuple[pytest.MarkDecorator, ...]:
|
||||
if target == 'esp32s3':
|
||||
return (pytest.mark.flash_encryption_f4r8,)
|
||||
|
||||
return (pytest.mark.flash_encryption,)
|
||||
|
||||
|
||||
@pytest.mark.generic
|
||||
@pytest.mark.parametrize(
|
||||
'config',
|
||||
@@ -19,36 +26,15 @@ def test_i80_lcd(dut: Dut) -> None:
|
||||
dut.run_all_single_board_cases()
|
||||
|
||||
|
||||
@pytest.mark.flash_encryption_f4r8
|
||||
@pytest.mark.parametrize(
|
||||
'config',
|
||||
'config, target',
|
||||
[
|
||||
'flash_enc',
|
||||
pytest.param('flash_enc', target, marks=get_flash_encryption_marks(target))
|
||||
for target in soc_filtered_targets(
|
||||
'SOC_LCD_I80_SUPPORTED == 1 and SOC_PSRAM_DMA_CAPABLE == 1 and SOC_FLASH_ENC_SUPPORTED == 1'
|
||||
)
|
||||
],
|
||||
indirect=True,
|
||||
)
|
||||
@idf_parametrize('target', ['esp32s3'], indirect=['target'])
|
||||
def test_i80_lcd_with_flash_encryption_esp32s3_f4r8(dut: Dut) -> None:
|
||||
dut.run_all_single_board_cases()
|
||||
|
||||
|
||||
@pytest.mark.flash_encryption
|
||||
@pytest.mark.parametrize(
|
||||
'config',
|
||||
[
|
||||
'flash_enc',
|
||||
],
|
||||
indirect=True,
|
||||
)
|
||||
@idf_parametrize(
|
||||
'target',
|
||||
soc_filtered_targets(
|
||||
'SOC_LCD_I80_SUPPORTED == 1 and '
|
||||
'SOC_PSRAM_DMA_CAPABLE == 1 and '
|
||||
'SOC_FLASH_ENC_SUPPORTED == 1 and '
|
||||
'IDF_TARGET not in ["esp32s3"]'
|
||||
),
|
||||
indirect=['target'],
|
||||
)
|
||||
def test_i80_lcd_with_flash_encryption(dut: Dut) -> None:
|
||||
dut.run_all_single_board_cases()
|
||||
|
||||
@@ -6,6 +6,13 @@ from pytest_embedded_idf.utils import idf_parametrize
|
||||
from pytest_embedded_idf.utils import soc_filtered_targets
|
||||
|
||||
|
||||
def get_flash_encryption_marks(target: str) -> tuple[pytest.MarkDecorator, ...]:
|
||||
if target == 'esp32s3':
|
||||
return (pytest.mark.flash_encryption_f4r8,)
|
||||
|
||||
return (pytest.mark.flash_encryption,)
|
||||
|
||||
|
||||
@pytest.mark.octal_psram
|
||||
@pytest.mark.parametrize(
|
||||
'config',
|
||||
@@ -38,33 +45,13 @@ def test_rgb_lcd(dut: Dut) -> None:
|
||||
dut.run_all_single_board_cases()
|
||||
|
||||
|
||||
@pytest.mark.flash_encryption_f4r8
|
||||
@pytest.mark.parametrize(
|
||||
'config',
|
||||
'config, target',
|
||||
[
|
||||
'flash_enc',
|
||||
pytest.param('flash_enc', target, marks=get_flash_encryption_marks(target))
|
||||
for target in soc_filtered_targets('SOC_LCD_RGB_SUPPORTED == 1 and SOC_FLASH_ENC_SUPPORTED == 1')
|
||||
],
|
||||
indirect=True,
|
||||
)
|
||||
@idf_parametrize('target', ['esp32s3'], indirect=['target'])
|
||||
def test_rgb_lcd_with_flash_encryption_esp32s3_f4r8(dut: Dut) -> None:
|
||||
dut.run_all_single_board_cases()
|
||||
|
||||
|
||||
@pytest.mark.flash_encryption
|
||||
@pytest.mark.parametrize(
|
||||
'config',
|
||||
[
|
||||
'flash_enc',
|
||||
],
|
||||
indirect=True,
|
||||
)
|
||||
@idf_parametrize(
|
||||
'target',
|
||||
soc_filtered_targets(
|
||||
'SOC_LCD_RGB_SUPPORTED == 1 and SOC_FLASH_ENC_SUPPORTED == 1 and IDF_TARGET not in ["esp32s3"]'
|
||||
),
|
||||
indirect=['target'],
|
||||
)
|
||||
def test_rgb_lcd_with_flash_encryption(dut: Dut) -> None:
|
||||
dut.run_all_single_board_cases()
|
||||
|
||||
Reference in New Issue
Block a user