From 34d6720bb9371ad885f8e642a77d869929db15d6 Mon Sep 17 00:00:00 2001 From: "Maciej W. Rozycki" Date: Tue, 12 Dec 2023 13:09:45 +0000 Subject: Set `testcase_timeout' earlier on in `gdb_comm_load' Move the setting of `testcase_timeout' earlier on in `gdb_comm_load'. It will be needed for reporting later on. No semantics change. * config/gdb-comm.exp (gdb_comm_load): Set `testcase_timeout' earlier on. --- config/gdb-comm.exp | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/config/gdb-comm.exp b/config/gdb-comm.exp index fca0bbb..909bb69 100644 --- a/config/gdb-comm.exp +++ b/config/gdb-comm.exp @@ -267,6 +267,13 @@ proc gdb_comm_load { dest prog args } { return [list "untested" ""] } + # FIXME: The value 300 below should be a parameter. + if {[board_info $dest exists testcase_timeout]} { + set testcase_timeout [board_info $dest testcase_timeout] + } else { + set testcase_timeout 300 + } + if { [isremote host] || ![board_info host exists fileid] } { gdb_comm_start $dest } @@ -414,12 +421,6 @@ proc gdb_comm_load { dest prog args } { } else { remote_send host "run\n" } - # FIXME: The value 300 below should be a parameter. - if {[board_info $dest exists testcase_timeout]} { - set testcase_timeout [board_info $dest testcase_timeout] - } else { - set testcase_timeout 300 - } remote_expect host $testcase_timeout { -re "Line.*Jump anyway.*.y or n.*" { remote_send host "y\n" -- cgit v1.1