aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMaciej W. Rozycki <macro@embecosm.com>2023-12-12 13:10:03 +0000
committerJacob Bachmeyer <jcb@gnu.org>2023-12-13 19:59:34 -0600
commitef0e2f97866f42e7197a26ef7ced3d30efacd9a8 (patch)
tree558180f9d20a4d1d48c0c037fce3650c30e4ba52
parentfbdcba42176e9f76c1d9e898347c91abd8b86df1 (diff)
Harmonise test execution reporting across protocols
Report both the full command and the timeout value consistently across various communication protocols, and always always output the report to the log file, so that procedures do not have to be locally overridden to extract this data where needed to reproduce an issue by hand. * baseboards/qemu.exp (qemu_load): Add execution reporting. * config/gdb-comm.exp (gdb_comm_load): Likewise. * config/gdb_stub.exp (gdb_stub_load): Likewise. * config/sim.exp (sim_load): Likewise. * config/unix.exp (unix_load): Report full command in addition to timeout value.
-rw-r--r--baseboards/qemu.exp2
-rw-r--r--config/gdb-comm.exp2
-rw-r--r--config/gdb_stub.exp2
-rw-r--r--config/sim.exp2
-rw-r--r--config/unix.exp3
5 files changed, 10 insertions, 1 deletions
diff --git a/baseboards/qemu.exp b/baseboards/qemu.exp
index 0cd96bf..b6a53c5 100644
--- a/baseboards/qemu.exp
+++ b/baseboards/qemu.exp
@@ -206,6 +206,8 @@ proc qemu_load { dest prog args } {
set wait_timeout $test_timeout
}
+ verbose -log "Executing on $dest: $prog (timeout = $wait_timeout)" 2
+
set ret [local_exec "$qemu $prog" "" "" $wait_timeout]
if { [array size ret] == 0 } {
diff --git a/config/gdb-comm.exp b/config/gdb-comm.exp
index 21893dc..9e3c1c7 100644
--- a/config/gdb-comm.exp
+++ b/config/gdb-comm.exp
@@ -275,6 +275,8 @@ proc gdb_comm_load { dest prog args } {
set testcase_timeout 300
}
+ verbose -log "Executing on $dest: $prog (timeout = $testcase_timeout)" 2
+
if { [isremote host] || ![board_info host exists fileid] } {
gdb_comm_start $dest
}
diff --git a/config/gdb_stub.exp b/config/gdb_stub.exp
index be1369a..447c626 100644
--- a/config/gdb_stub.exp
+++ b/config/gdb_stub.exp
@@ -486,6 +486,8 @@ proc gdb_stub_load { dest prog args } {
set wait_timeout $test_timeout
}
+ verbose -log "Executing on $dest: $prog (timeout = $wait_timeout)" 2
+
set result [remote_spawn $dest $prog]
if { $result < 0 } {
diff --git a/config/sim.exp b/config/sim.exp
index ed5f67b..ce8c834 100644
--- a/config/sim.exp
+++ b/config/sim.exp
@@ -93,6 +93,8 @@ proc sim_load { dest prog args } {
set cmd $prog
}
+ verbose -log "Executing on $dest: $prog (timeout = $sim_time_limit)" 2
+
# Run the program with a limited amount of real time. While
# this isn't as nice as limiting the amount of CPU time, it
# will have to do.
diff --git a/config/unix.exp b/config/unix.exp
index b359b8b..2c280c5 100644
--- a/config/unix.exp
+++ b/config/unix.exp
@@ -77,13 +77,14 @@ proc unix_load { dest prog args } {
setenv LD_LIBRARY_PATH $ld_library_path:$orig_ld_library_path
setenv SHLIB_PATH $ld_library_path:$orig_ld_library_path
verbose -log "Setting LD_LIBRARY_PATH to $ld_library_path:$orig_ld_library_path" 2
- verbose -log "Execution timeout is: $wait_timeout" 2
# Prepend shell name (e.g., qemu emulator) to the command.
if {[board_info $dest exists exec_shell]} {
set command "[board_info $dest exec_shell] $command"
}
+ verbose -log "Executing on $dest: $command (timeout = $wait_timeout)" 2
+
set id [remote_spawn $dest $command "readonly"]
if { $id < 0 } {
set output "remote_spawn failed"