kopia lustrzana https://github.com/espressif/esp-idf
ci(coredump): enable custom stack tests for riscv chips
rodzic
1503b5fcf2
commit
483b4cd65b
|
@ -9,37 +9,50 @@ import pexpect
|
|||
import pytest
|
||||
from test_panic_util import PanicTestDut
|
||||
|
||||
# Markers for all the targets this test currently runs on
|
||||
TARGETS_TESTED = [
|
||||
pytest.mark.esp32,
|
||||
TARGETS_XTENSA_SINGLE_CORE = [
|
||||
pytest.mark.esp32s2,
|
||||
pytest.mark.esp32c3,
|
||||
]
|
||||
|
||||
TARGETS_XTENSA_DUAL_CORE = [
|
||||
pytest.mark.esp32,
|
||||
pytest.mark.esp32s3,
|
||||
]
|
||||
|
||||
TARGETS_XTENSA = TARGETS_XTENSA_SINGLE_CORE + TARGETS_XTENSA_DUAL_CORE
|
||||
|
||||
TARGETS_RISCV_SINGLE_CORE = [
|
||||
pytest.mark.esp32c2,
|
||||
pytest.mark.esp32c3,
|
||||
pytest.mark.esp32c6,
|
||||
pytest.mark.esp32h2,
|
||||
]
|
||||
|
||||
TARGETS_RISCV_DUAL_CORE = [
|
||||
pytest.mark.esp32p4,
|
||||
]
|
||||
|
||||
TARGETS_RISCV = TARGETS_RISCV_SINGLE_CORE + TARGETS_RISCV_DUAL_CORE
|
||||
|
||||
# Markers for all the targets this test currently runs on
|
||||
TARGETS_ALL = TARGETS_XTENSA + TARGETS_RISCV
|
||||
|
||||
# Some tests only run on dual-core targets, they use the config below.
|
||||
TARGETS_DUAL_CORE = TARGETS_XTENSA_DUAL_CORE + TARGETS_RISCV_DUAL_CORE
|
||||
|
||||
# Most tests run on all targets and with all configs.
|
||||
# This list is passed to @pytest.mark.parametrize for each of the test cases.
|
||||
# It creates an outer product of the sets: [configs] x [targets],
|
||||
# with some exceptions.
|
||||
CONFIGS = [
|
||||
pytest.param('coredump_flash_bin_crc', marks=TARGETS_TESTED),
|
||||
pytest.param('coredump_flash_elf_sha', marks=TARGETS_TESTED),
|
||||
pytest.param('coredump_uart_bin_crc', marks=TARGETS_TESTED),
|
||||
pytest.param('coredump_uart_elf_crc', marks=TARGETS_TESTED),
|
||||
pytest.param('gdbstub', marks=TARGETS_TESTED),
|
||||
pytest.param('panic', marks=TARGETS_TESTED),
|
||||
pytest.param('coredump_flash_bin_crc', marks=TARGETS_ALL),
|
||||
pytest.param('coredump_flash_elf_sha', marks=TARGETS_ALL),
|
||||
pytest.param('coredump_uart_bin_crc', marks=TARGETS_ALL),
|
||||
pytest.param('coredump_uart_elf_crc', marks=TARGETS_ALL),
|
||||
pytest.param('coredump_flash_custom_stack', marks=TARGETS_RISCV),
|
||||
pytest.param('gdbstub', marks=TARGETS_ALL),
|
||||
pytest.param('panic', marks=TARGETS_ALL),
|
||||
]
|
||||
|
||||
# Some tests only run on dual-core targets, they use the config below.
|
||||
TARGETS_DUAL_CORE = [
|
||||
pytest.mark.esp32,
|
||||
pytest.mark.esp32s3,
|
||||
pytest.mark.esp32p4,
|
||||
]
|
||||
CONFIGS_DUAL_CORE = [
|
||||
pytest.param('coredump_flash_bin_crc', marks=TARGETS_DUAL_CORE),
|
||||
pytest.param('coredump_flash_elf_sha', marks=TARGETS_DUAL_CORE),
|
||||
|
@ -60,28 +73,20 @@ CONFIGS_EXTRAM_STACK = [
|
|||
pytest.param('coredump_extram_stack', marks=[pytest.mark.esp32s3, pytest.mark.quad_psram]),
|
||||
]
|
||||
|
||||
TARGETS_HW_STACK_GUARD = [
|
||||
pytest.mark.esp32c2,
|
||||
pytest.mark.esp32c3,
|
||||
pytest.mark.esp32c6,
|
||||
pytest.mark.esp32h2,
|
||||
pytest.mark.esp32p4,
|
||||
]
|
||||
|
||||
CONFIGS_HW_STACK_GUARD = [
|
||||
pytest.param('coredump_flash_bin_crc', marks=TARGETS_HW_STACK_GUARD),
|
||||
pytest.param('coredump_uart_bin_crc', marks=TARGETS_HW_STACK_GUARD),
|
||||
pytest.param('coredump_uart_elf_crc', marks=TARGETS_HW_STACK_GUARD),
|
||||
pytest.param('gdbstub', marks=TARGETS_HW_STACK_GUARD),
|
||||
pytest.param('panic', marks=TARGETS_HW_STACK_GUARD),
|
||||
pytest.param('coredump_flash_bin_crc', marks=TARGETS_RISCV),
|
||||
pytest.param('coredump_uart_bin_crc', marks=TARGETS_RISCV),
|
||||
pytest.param('coredump_uart_elf_crc', marks=TARGETS_RISCV),
|
||||
pytest.param('gdbstub', marks=TARGETS_RISCV),
|
||||
pytest.param('panic', marks=TARGETS_RISCV),
|
||||
]
|
||||
|
||||
CONFIGS_HW_STACK_GUARD_DUAL_CORE = [
|
||||
pytest.param('coredump_flash_bin_crc', marks=[pytest.mark.esp32p4]),
|
||||
pytest.param('coredump_uart_bin_crc', marks=[pytest.mark.esp32p4]),
|
||||
pytest.param('coredump_uart_elf_crc', marks=[pytest.mark.esp32p4]),
|
||||
pytest.param('gdbstub', marks=[pytest.mark.esp32p4]),
|
||||
pytest.param('panic', marks=[pytest.mark.esp32p4]),
|
||||
pytest.param('coredump_flash_bin_crc', marks=TARGETS_RISCV_DUAL_CORE),
|
||||
pytest.param('coredump_uart_bin_crc', marks=TARGETS_RISCV_DUAL_CORE),
|
||||
pytest.param('coredump_uart_elf_crc', marks=TARGETS_RISCV_DUAL_CORE),
|
||||
pytest.param('gdbstub', marks=TARGETS_RISCV_DUAL_CORE),
|
||||
pytest.param('panic', marks=TARGETS_RISCV_DUAL_CORE),
|
||||
]
|
||||
|
||||
# Panic abort information will start with this string.
|
||||
|
|
|
@ -0,0 +1,5 @@
|
|||
CONFIG_ESP_COREDUMP_ENABLE_TO_FLASH=y
|
||||
CONFIG_ESP_COREDUMP_DATA_FORMAT_ELF=y
|
||||
CONFIG_ESP_COREDUMP_CHECKSUM_SHA256=y
|
||||
CONFIG_LOG_DEFAULT_LEVEL_INFO=y
|
||||
CONFIG_ESP_COREDUMP_STACK_SIZE=2048
|
|
@ -140,6 +140,7 @@ class PanicTestDut(IdfDut):
|
|||
espcoredump_args = [
|
||||
sys.executable,
|
||||
espcoredump_script,
|
||||
'-b115200',
|
||||
'info_corefile',
|
||||
'--core',
|
||||
coredump_file_name,
|
||||
|
|
Ładowanie…
Reference in New Issue