mirror of
https://github.com/espressif/esp-idf.git
synced 2025-08-02 20:24:32 +02:00
tools: Increase the internal GDB response delay for espcoredump CI tests
This commit is contained in:
@@ -30,6 +30,8 @@ import time
|
|||||||
|
|
||||||
from pygdbmi.gdbcontroller import GdbController, DEFAULT_GDB_TIMEOUT_SEC
|
from pygdbmi.gdbcontroller import GdbController, DEFAULT_GDB_TIMEOUT_SEC
|
||||||
|
|
||||||
|
_gdb_timeout_sec = DEFAULT_GDB_TIMEOUT_SEC
|
||||||
|
|
||||||
IDF_PATH = os.getenv('IDF_PATH')
|
IDF_PATH = os.getenv('IDF_PATH')
|
||||||
if not IDF_PATH:
|
if not IDF_PATH:
|
||||||
sys.stderr.write("IDF_PATH is not found! Set proper IDF_PATH in environment.\n")
|
sys.stderr.write("IDF_PATH is not found! Set proper IDF_PATH in environment.\n")
|
||||||
@@ -1234,7 +1236,7 @@ def gdbmi_run_cmd_get_responses(p, cmd, resp_message, resp_type, multiple=True,
|
|||||||
# type: (GdbController, str, typing.Optional[str], str, bool, typing.Optional[str], typing.Optional[str]) -> list
|
# type: (GdbController, str, typing.Optional[str], str, bool, typing.Optional[str], typing.Optional[str]) -> list
|
||||||
|
|
||||||
p.write(cmd, read_response=False)
|
p.write(cmd, read_response=False)
|
||||||
t_end = time.time() + DEFAULT_GDB_TIMEOUT_SEC
|
t_end = time.time() + _gdb_timeout_sec
|
||||||
filtered_response_list = []
|
filtered_response_list = []
|
||||||
all_responses = []
|
all_responses = []
|
||||||
while time.time() < t_end:
|
while time.time() < t_end:
|
||||||
@@ -1494,6 +1496,12 @@ def main():
|
|||||||
type=int,
|
type=int,
|
||||||
default=os.environ.get('ESPTOOL_BAUD', esptool.ESPLoader.ESP_ROM_BAUD))
|
default=os.environ.get('ESPTOOL_BAUD', esptool.ESPLoader.ESP_ROM_BAUD))
|
||||||
|
|
||||||
|
parser.add_argument(
|
||||||
|
'--gdb-timeout-sec',
|
||||||
|
help='Overwrite the default internal delay for gdb responses',
|
||||||
|
type=int,
|
||||||
|
default=DEFAULT_GDB_TIMEOUT_SEC)
|
||||||
|
|
||||||
subparsers = parser.add_subparsers(
|
subparsers = parser.add_subparsers(
|
||||||
dest='operation',
|
dest='operation',
|
||||||
help='Run coredumper {command} -h for additional help')
|
help='Run coredumper {command} -h for additional help')
|
||||||
@@ -1537,6 +1545,9 @@ def main():
|
|||||||
|
|
||||||
args = parser.parse_args()
|
args = parser.parse_args()
|
||||||
|
|
||||||
|
global _gdb_timeout_sec
|
||||||
|
_gdb_timeout_sec = args.gdb_timeout_sec
|
||||||
|
|
||||||
log_level = logging.CRITICAL
|
log_level = logging.CRITICAL
|
||||||
if args.debug == 0:
|
if args.debug == 0:
|
||||||
log_level = logging.CRITICAL
|
log_level = logging.CRITICAL
|
||||||
|
@@ -2,9 +2,9 @@
|
|||||||
|
|
||||||
{ coverage debug sys \
|
{ coverage debug sys \
|
||||||
&& coverage erase \
|
&& coverage erase \
|
||||||
&& coverage run -a --source=espcoredump ../espcoredump.py info_corefile -m -t b64 -c coredump.b64 -s core.elf test.elf &> output \
|
&& coverage run -a --source=espcoredump ../espcoredump.py --gdb-timeout-sec 5 info_corefile -m -t b64 -c coredump.b64 -s core.elf test.elf &> output \
|
||||||
&& diff expected_output output \
|
&& diff expected_output output \
|
||||||
&& coverage run -a --source=espcoredump ../espcoredump.py info_corefile -m -t elf -c core.elf test.elf &> output2 \
|
&& coverage run -a --source=espcoredump ../espcoredump.py --gdb-timeout-sec 5 info_corefile -m -t elf -c core.elf test.elf &> output2 \
|
||||||
&& diff expected_output output2 \
|
&& diff expected_output output2 \
|
||||||
&& coverage run -a --source=espcoredump ./test_espcoredump.py \
|
&& coverage run -a --source=espcoredump ./test_espcoredump.py \
|
||||||
&& coverage report \
|
&& coverage report \
|
||||||
|
Reference in New Issue
Block a user