diff options
author | Maxim Kuvyrkov <maxim.kuvyrkov@linaro.org> | 2016-06-28 09:40:01 +0100 |
---|---|---|
committer | Jacob Bachmeyer <jcb62281+dev@gmail.com> | 2020-06-15 21:50:07 -0500 |
commit | 6e55af0128f2f4e9c399e58bfa0ec4c62cf4aa92 (patch) | |
tree | 3931995394f97008450adc0ec70afd1a1d2b94fe | |
parent | 5fafcd43b2d22b2227e62f7278584418c6449824 (diff) | |
download | dejagnu-6e55af0128f2f4e9c399e58bfa0ec4c62cf4aa92.zip dejagnu-6e55af0128f2f4e9c399e58bfa0ec4c62cf4aa92.tar.gz dejagnu-6e55af0128f2f4e9c399e58bfa0ec4c62cf4aa92.tar.bz2 |
Support using QEMU in local/remote testing using default "unix" board
If the board file defines "exec_shell", prepend it before the local or
remote command.
-rw-r--r-- | config/unix.exp | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/config/unix.exp b/config/unix.exp index 2e38454..dc3f781 100644 --- a/config/unix.exp +++ b/config/unix.exp @@ -78,6 +78,11 @@ proc unix_load { dest prog args } { verbose -log "Setting LD_LIBRARY_PATH to $ld_library_path:$orig_ld_library_path" 2 verbose -log "Execution timeout is: $test_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" + } + set id [remote_spawn $dest $command "readonly"] if { $id < 0 } { set output "remote_spawn failed" @@ -119,6 +124,14 @@ proc unix_load { dest prog args } { return [list "unresolved" ""] } } + + # Prepend shell name (e.g., qemu emulator) to the command. + if {[board_info $dest exists exec_shell]} { + set remotecmd "[board_info $dest exec_shell] $remotefile" + } else { + set remotecmd "$remotefile" + } + set status [remote_exec $dest $remotefile $parg $inp] remote_file $dest delete $remotefile.o $remotefile if { [lindex $status 0] < 0 } { |