2023-05-11 02:50:27 -04:00
|
|
|
# SPDX-FileCopyrightText: 2023 Espressif Systems (Shanghai) CO LTD
|
|
|
|
# SPDX-License-Identifier: CC0-1.0
|
2023-05-26 08:45:48 -04:00
|
|
|
import os
|
|
|
|
|
2023-05-11 02:50:27 -04:00
|
|
|
import pytest
|
|
|
|
from pytest_embedded import Dut
|
|
|
|
|
|
|
|
|
|
|
|
@pytest.mark.supported_targets
|
|
|
|
@pytest.mark.generic
|
2023-05-11 08:34:48 -04:00
|
|
|
def test_crypto(dut: Dut) -> None:
|
2023-05-26 08:45:48 -04:00
|
|
|
# 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
|
|
|
|
|
2023-10-16 08:00:36 -04:00
|
|
|
dut.expect('Tests finished', timeout=timeout)
|
|
|
|
|
|
|
|
|
|
|
|
@pytest.mark.supported_targets
|
|
|
|
@pytest.mark.generic
|
|
|
|
@pytest.mark.parametrize('config', ['long_aes_operations'], indirect=True)
|
|
|
|
def test_crypto_long_aes_operations(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
|
|
|
|
|
|
|
|
dut.expect('Tests finished', timeout=timeout)
|