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(-) dejagnu-gdb-comm-testcase-timeout.diff Index: dejagnu/config/gdb-comm.exp =================================================================== --- dejagnu.orig/config/gdb-comm.exp +++ dejagnu/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"