test: panic: use gdb-no-python to have ability to send signals

This commit is contained in:
Alexey Lapshin 2023-04-19 15:33:32 +08:00
parent 6a54c25823
commit 96768d7596

View File

@ -160,20 +160,21 @@ class PanicTestDut(IdfDut):
Runs GDB and connects it to the "serial" port of the DUT.
After this, the DUT expect methods can no longer be used to capture output.
"""
gdb_args = ['--nx', '--quiet', '--interpreter=mi2']
if self.is_xtensa:
gdb_path = f'xtensa-{self.target}-elf-gdb'
gdb_path = 'xtensa-esp-elf-gdb-no-python' # TODO: GCC-311
gdb_args = [f'--mcpu={self.target}'] + gdb_args
else:
gdb_path = 'riscv32-esp-elf-gdb'
gdb_path = 'riscv32-esp-elf-gdb-no-python' # TODO: GCC-311
try:
from pygdbmi.constants import GdbTimeoutError
default_gdb_args = ['--nx', '--quiet', '--interpreter=mi2']
gdb_command = [gdb_path] + default_gdb_args
gdb_command = [gdb_path] + gdb_args
self.gdbmi = GdbController(command=gdb_command)
pygdbmi_logger = attach_logger()
except ImportError:
# fallback for pygdbmi<0.10.0.0.
from pygdbmi.gdbcontroller import GdbTimeoutError
self.gdbmi = GdbController(gdb_path=gdb_path)
self.gdbmi = GdbController(gdb_path=gdb_path, gdb_args=gdb_args)
pygdbmi_logger = self.gdbmi.logger
# pygdbmi logs to console by default, make it log to a file instead